[Bug]: Keyboard adjust doesn't work in Android 13 if Devices locks/Unlocks
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
Android
What happened?
We are using gorhom/react-native-bottom-sheet: 5.2.6 and using this library we are using TextInput inside the bottomsheet Modal where we are trying to adjust the bottomsheetModal using runOnUI(() => { internal.shouldHandleKeyboardEvents.value = true })()
on focus but this is working fine in all versions, but in android 13 if i lock my device and unlock try to adjust the bottomsheet modal again keyboard is not not getting adjusted its overlapping the modal.
<BottomSheetModal ref={modalRef} snapPoints={snapPoints} onDismiss={() => { onClose?.() onModalClosed?.() }} onAnimate={handleOpen} overrideReduceMotion={ReduceMotion.Never} animatedPosition={animatedPosition} keyboardBehavior="interactive" keyboardBlurBehavior="restore" accessibilityLabel={'close'} accessibilityHint={'bottomsheet modal'} android_keyboardInputMode={Platform.OS === 'android' && Platform.Version >= 34 ? 'adjustPan' : 'adjustResize'} importantForAccessibility="yes">
<InputText/></BottomSheetModal>
@gorhom @thecodedrift
Please help in this. issue.
Reproduction steps
- start the modal with input text, it will adjust properly.
- lock the phone and unlock it.
- try to open the modal and focus on the input text.
this is working demo when we initially run it. https://github.com/user-attachments/assets/8ef7df7c-1c2a-447a-a08f-b6534370fefc
this is after lock.unlock device its not working https://github.com/user-attachments/assets/d6aa7447-801c-4b7f-addb-ba5d6f980315
Reproduction sample
https://snack.expo.dev/@nounreal/bottom-sheet---issue-reproduction-template
Relevant log output
@gorhom please check its kinda major issue for me now.
Up
"react-native-reanimated": "3.19.3", "@gorhom/bottom-sheet": "5.2.6",
in this version internal.shouldHandleKeyboardEvents.value = true this has been removed how should we now adjust the TextInput in bottomsheetModal and it lags
+1
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
+1