You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
useKeyboard does not respect iPad floating keyboard #314
When Floating Keyboard is open from the start (maybe you already set this in another app), it logs:
LOG keyboardHeight: 0
LOG keyboardShown: false
And then when you swipe to remove the floating keyboard and replace it with the regular keyboard, it logs (this is good):
LOG keyboardHeight: 337
LOG keyboardShown: true
And then, pinch to enable the floating keyboard again, and it logs (this is bad):
LOG keyboardHeight: 337
LOG keyboardShown: false
It seems like at the very least, keyboardHeight should be set to 0 on the last scenario. That way you can inform the your KeyboardAvoidingView to be enabled={false}. That is how I discovered the issue.
There is a decent answer here about detecting the floating keyboard. Perhaps some additional fields could be added to the hook to make it more useful.
PR #430 covers both failure modes described here on current React Native versions:
mounting while the floating keyboard is already open initializes keyboardShown, coordinates, and height from Keyboard.isVisible() / Keyboard.metrics()
every keyboardDidHide now clears keyboardHeight, including coordinate-bearing iPad events
The calls are optional so the package keeps its RN >=0.70 runtime range; older RN versions without these core APIs retain the previous closed-state fallback until an event arrives. The PR includes regression coverage for initial-open state and non-null hide payloads.
Activity
huytdps13400 commentedon Aug 23, 2026
PR #430 covers both failure modes described here on current React Native versions:
keyboardShown, coordinates, and height fromKeyboard.isVisible()/Keyboard.metrics()keyboardDidHidenow clearskeyboardHeight, including coordinate-bearing iPad eventsThe calls are optional so the package keeps its RN >=0.70 runtime range; older RN versions without these core APIs retain the previous closed-state fallback until an event arrives. The PR includes regression coverage for initial-open state and non-null hide payloads.