feedback-assistant / reports

Open collection of Apple Feedback Assistant reports
236 stars 2 forks source link

FB13296535: SafeAreaInset layout is wrong while dismissing keyboard with .scrollDismissesKeyboard(.interactively) #437

Open tngranados opened 1 year ago

tngranados commented 1 year ago

Description

When using .safeAreaInset(edge: .bottom) on a ScrollView that also has .scrollDismissesKeyboard(.interactively) set, the view in the safeAreaInset will stay wrongly in the middle of the screen while interactively dismissing the keyboard

To replicate the issue. Create a ScrollView with some elements. Add the .scrollDismissesKeyboard(.interactively) modifier and a view in the bottom with .safeAreaInset(edge: .bottom), a TextField would work best as it would allow you to open the keyboard straight from there. Then, open the keyboard, scroll down to dismiss it.

The expected behaviour would be that the view in the .safeAreaInset(edge: .bottom) would scroll down with the keyboard.

The actual behaviour observed is that .safeAreaInset(edge: .bottom) view would stay in place until the keyboard is fully dismissed, then, quickly move to its correct position.

This is happening with Xcode 15.0 and iOS 17.0 both in the simulator and on device. As far as I can tell, the same happened with iOS 16 and 15.

There is a simple 20 lines of code project attached that replicates the issue. There is also a 6 seconds video that shows the problem.

Files

SafeAreaInsetInteractiveDismissKeyboard.zip

https://github.com/feedback-assistant/reports/assets/593079/f8ff9c91-5f5b-4c34-99ef-163c29784b3b

frogcjn commented 10 months ago

This is the SwiftUI Bug. Try my solution: https://github.com/frogcjn/BottomInputBarSwiftUI

nharbo commented 1 month ago

Any news on this? Having same issue. Was hoping it was fixed in iOS 18, no nope..

tngranados commented 1 month ago

I haven't received an answer to the feedback I submitted to Apple (this one or any other, ever 🤷🏻‍♂️)

mansibarodia10057 commented 1 month ago

I haven't received an answer to the feedback I submitted to Apple (this one or any other, ever 🤷🏻‍♂️)

Based on my experience with previous bugs/feedback that I had logged to Apple, they respond only when bug is fixed in new iOS release or if they need a sample app. When new Calendar was out (in iOS 13, if I remember it right), I had submitted a feedback to allow styling the calendar and had received their response after 2 years once the functionality was available in new iOS release.