-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard handler causing full screen sheet to rapidly close and reopen, header scrolling behind dynamic island. #365
Comments
• Same effect with BlurView or View btw -- already ruled that out. Here's some more background code:
|
Hi all, To confirm, I'm also seeing this exact same behaviour, on an actions sheet with a set height: Screen.Recording.2024-05-19.at.11.14.06.1.mp4The code for the action sheet is as follows, and I have confirmed that this behaviour exists regardless of safeArea modifications or drawUnderStatus bar. It seems like the minimal reproducible is this:
I absolutely love this library - would be happy to dig into the code and try to resolve if pull requests are accepted. Any pointers appreciated! Thanks, Ryan |
I've faced it as well, but only in emulators, not on real devices. dunno the cause yet btw |
use this. its work for me
|
@alireza-k74 Bro if you keep closable false then it won't close if you open keyboard or not |
Facing the same issue at the moment, setting I realize that it happen when the position is below 0. You can check with
I will try digging in the code to find a fix. |
I think I have a similar issue where the keyboard would briefly reopen when dismissed, shifting the content up. Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-06-11.at.12.23.20.mp4After looking a bit into the code for the keyboard handling, I found that the keyboard event listeners were firing twice, probably because of rerenders during the keyboard animations. Some simple changes fixed the issue for me, here is the patch to use with patch package, maybe someone else will find it useful.
|
is good! this works for me |
Having the exact same issue as well, both when testing on a simulator and a physical device. On Android everything seems to be working as expected. |
// Issue 1: While sheet is fullscren, the keyboard handler makes the sheet rapidly close and open again, onFocus, and onBlur.
// Issue 2: There's no method to add margin to the top of the main container, so when you scroll on a list, the header sits behind the iPhone dynamic island. drawUnderStatusBar={false} and statusBarTranslucent={false} don't do anything.
See video here: https://github.com/ammarahm-ed/react-native-actions-sheet/assets/103525068/56036d80-363e-45fc-8c88-ee1c395bd95d
// Attempted solutions for Issue 1:
// a. Set keyboardHandlerEnabled={false} and wrap the view, sheet, or children in react-native KeyboardAvoidingView. Didn't do anything
// b. Attempted onChange position tracking to dynamically add padding to the bottom of the sheet. Massive jitter artifacts. Not a viable solution
// c. 🛑 Only option for keyboard handling is to use the built-in keyboardHandlerEnabled prop.
// Attempted solutions for Issue 2:
// a. Add paddingTop: 80 to containerStyle. Problem: doesn't solve issue 1
// b. Set containerStyle={{backgroundColor: 'transparent', height: '90%'}} and payload value View style={{backgroundColor: 'white', height: '110%'}}. ⭐️ Best solution yet, but causes several render artifacts, especially when opening a TextInput that sits behind the keyboard.
The text was updated successfully, but these errors were encountered: