File tree Expand file tree Collapse file tree
android/src/main/java/com/lodev09/truesheet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -821,14 +821,19 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
821821 setupSheetDetents()
822822 if (! isDismissing && detentIndexBeforeKeyboard >= 0 ) {
823823 setStateForDetentIndex(detentIndexBeforeKeyboard)
824- detentIndexBeforeKeyboard = - 1
825824 }
826825 }
827826
828- override fun keyboardDidHide () {}
827+ override fun keyboardDidHide () {
828+ if (! shouldHandleKeyboard(checkFocus = false )) return
829+ detentIndexBeforeKeyboard = - 1
830+ positionFooter()
831+ }
829832
830833 override fun keyboardDidChangeHeight (height : Int ) {
831- if (! shouldHandleKeyboard()) return
834+ // Skip focus check if already handling keyboard (focus may be lost during hide)
835+ val isHandlingKeyboard = detentIndexBeforeKeyboard >= 0
836+ if (! shouldHandleKeyboard(checkFocus = ! isHandlingKeyboard)) return
832837 positionFooter()
833838 }
834839 }
You can’t perform that action at this time.
0 commit comments