Post

Replies

Boosts

Views

Activity

Reply to SwiftUI safe area stays offset after keyboard dismissal with “Reduce Motion” + “Prefer Cross-Fade” enabled (iOS 26)
One thing that makes this bug extremely annoying is that affects not only the view where the keyboard is presented, but also other views. This makes it difficult to come up with a workaround that works consistently as it affects multiple views in the hierachy. As an example, I have a view that presents two sheets both with a button in the safeAreaInset (think filtering the content), sheet 2 has an input field that when has receives focus obviously triggers the bug (with the accessibility settings on), but it also messes with the safe area in sheet 1. Extremely infuriating!
Oct ’25
Reply to SwiftUI safe area stays offset after keyboard dismissal with “Reduce Motion” + “Prefer Cross-Fade” enabled (iOS 26)
Seeing the same thing, here's a small reproduction: import SwiftUI struct ContentView: View { @State private var text = "" @FocusState private var isTextFocused @Environment(\.accessibilityReduceMotion) private var reduceMotion var body: some View { List { TextField("Input", text: $text) .focused($isTextFocused) .onSubmit { isTextFocused.toggle() } Text("Focus the text field then dismiss the keyboard") Text("Observe how the safe area doesn't change when dismissing the keyboard in iOS 26 with the below accessibility settings enabled.") Label("Reduce Motion? \(reduceMotion ? "true": "false")", systemImage: "accessibility") Label( "Prefer Cross-Fade Transitions? \(UIAccessibility.prefersCrossFadeTransitions ? "true": "false")", systemImage: "accessibility" ) } .scrollDismissesKeyboard(.immediately) .textFieldStyle(.roundedBorder) .border(.red) .safeAreaInset(edge: .bottom) { HStack { Text("This is in the safe area insets") Spacer() Button("Close Keyboard") { isTextFocused.toggle() } .buttonStyle(.borderedProminent) } .padding() .border(.teal) } } } It also happens when you have a sheet open and with a focused textfield/visible keyboard and you call the DismissAction, then even the parent view gets the wrong safe area. It's almost as if someone forgot to reset/update a value alongside the keyboard animation when the different "prefer cross-fade transitions" keyboard animation run.
Oct ’25