Skip to content

FB23705120: Toolbar menu buttons unreliable when placed inside TimelineView #822

Description

@FilonenkoM

Submission Date

2026-07-12

Status

Open

Area

SwiftUI

Operating System Version

iOS 26.4.1

Type

Incorrect/Unexpected Behavior

Description

Reproduces on iPad, iPhone simulator (iOS 26.4.1), on SwiftUI test app, and on UIKit production app, Liquid Glass, and temporary opt-out
Buttons in the toolbar are not functional (either fully inactive or periodically inactive) when at least one of them contains an image, and the View inside a TimelineView binds the timeline to some other View lifetime (environment in this example)

On the video, I'm tapping on menu items several times, but the taps are not registered

Simulator.Screen.Recording.-.iPhone.17e.-.2026-07-12.at.17.51.51.mov
struct ToolbarInsideTimelineBugView: View {
    var body: some View {
        NavigationStack {
            TimelineView(.animation) { timeline in
                Color.yellow
                    .toolbar { // first factor - .toolbar ViewModifier is inside TimelineView
                        ToolbarItem(placement: .confirmationAction) {
                            Menu("Actions") {
                                // second factor - there should be at least one item that has an image
                                Button {
                                    print("ToolbarConditionalContentBugRepro: first action tapped")
                                } label: {
                                    Label("First action", systemImage: "doc")
                                }
                                Button("Second action") {
                                    print("ToolbarConditionalContentBugRepro: second action tapped")
                                }
                            }
                        }
                    }
                // third factor - timeline should be bound to the timeline of the inner View
                // just Text(String(describing: timeline)) does not work here
                    .environment(\.timelineViewModifierConfiguration, TimelineViewModifierConfiguration(
                        timeline: timeline
                    ))
            }
        }
    }
}

struct TimelineViewModifierConfiguration {
    let timeline: TimelineViewDefaultContext
}

private enum TimelineViewModifierConfigurationKey: EnvironmentKey {
    static let defaultValue: TimelineViewModifierConfiguration? = nil
}

extension EnvironmentValues {
    var timelineViewModifierConfiguration: TimelineViewModifierConfiguration? {
        get { self[TimelineViewModifierConfigurationKey.self] }
        set { self[TimelineViewModifierConfigurationKey.self] = newValue }
    }
}

Keywords

toolbar, timelineview, swiftui

Prerequisites

  • The title follows the format FB<number>: <title>
  • I will keep this issue updated with Apple's responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions