-
-
Notifications
You must be signed in to change notification settings - Fork 900
Open
Labels
Description
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS
What happened?
[v5.2.6] BottomSheetModal onChange is reporting corrupted index on mount when we have TextInput + autofocus.
That also breaks keyboardBlurBehavior="restore"
This issue might be related to this comment about invariant
throwing errors for unexpected index.
Reproduction steps
- Just open the modal and see the console reporting a big number for index
- Verify that
keyboardBlurBehavior="restore"
doesn't work when you tap "return" to dismiss the keyboard
Reproduction sample
https://snack.expo.dev/@pakerwreah/bottom-sheet-modal---wrong-index
Relevant log output
iPhone: handleSheetChanges 774 // on open
iPhone: handleSheetChanges 0 // on collapse
iPhone: handleSheetChanges -1 // on close