useMobileKeyboard now requires a focused input for keyboardOpen=true (both the chrome-overlap and iOS-gap paths). The moment an input blurs, the hook reports keyboardOpen=false instead of waiting hundreds of ms for iOS's visualViewport dismissal animation to settle. This makes App-level mobileKeyboardOpen flip false instantly on blur, so MobileNavBar reappears and project-content regains nav-bar padding in the same frame. The ChatView composer (and TodoModal/PlanningModeModal) snap to their post-keyboard layout in one move instead of crawling down with iOS's keyboard slide. Replaces the per-component 450ms suppress hack in ChatView (also dropped in this commit) which couldn't reach the parent layout's nav padding state and produced "below tab bar then snap up" jitter. Adds a regression test and updates four existing tests that assumed "vv shrinks → keyboard up" without focus (focus is now required). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5.6 KiB
5.6 KiB