| … | … | @@ -0,0 +1,26 @@ | |
| 5 | + | // layout that makes room for the keyboard gives it back as soon as the keyboard starts hiding. | |
| 6 | + | let keyboardShowing = KeyboardController.isVisible(); | |
| 7 | + | function subscribeKeyboardShowing(onChange: () => void) { | |
| 8 | + | keyboardShowing = KeyboardController.isVisible(); | |
🟠 High keyboard/useSoftKeyboardShowing.ts:8
When the rail mounts during keyboard dismissal, this line resets the shared state from false to true because KeyboardController.isVisible() stays true until keyboardDidHide. Since this hook does not listen for keyboardDidHide, the state remains true after the keyboard closes and subsequent renders keep the sidebar hidden; preserve the state tracked by the will-events when new consumers subscribe.
| 1 | - keyboardShowing = KeyboardController.isVisible(); |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/mobile/src/features/keyboard/useSoftKeyboardShowing.ts around line 8: |
| 2 | |
| 3 | When the rail mounts during keyboard dismissal, this line resets the shared state from `false` to `true` because `KeyboardController.isVisible()` stays true until `keyboardDidHide`. Since this hook does not listen for `keyboardDidHide`, the state remains true after the keyboard closes and subsequent renders keep the sidebar hidden; preserve the state tracked by the will-events when new consumers subscribe. |