Files
fusion/.changeset/android-chat-keyboard-dismiss.md
gsxdsm 3fbebd44e9 fix(dashboard): don't preventDefault on chat composer touchstart on Android
ChatView and QuickChatFAB both had an iOS-specific onTouchStart on the
textarea that called event.preventDefault() and then programmatically
re-focused the input — meant to suppress iOS's visualViewport auto-scroll
on re-focus. On Android, preventDefault on a textarea touchstart blocks
the soft keyboard from opening (programmatic focus() alone does not raise
the Android keyboard — only the default touch action does), so tapping
the main chat or quick chat composer focused the input but the keyboard
never appeared, looking like an instant dismiss.

Gate the touchstart workaround to iOS via isIOS().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:00:02 -07:00

1.1 KiB

@fusion/dashboard
@fusion/dashboard
patch

fix(dashboard): stop main-chat and quick-chat composers from instantly dismissing the Android soft keyboard

Two layered Android-specific fixes for the chat composers:

  1. The body scroll-lock applied while the keyboard is open in main chat was an iOS-specific workaround for visualViewport drift. On Android Chrome it does the opposite of what we want — mutating body { position: fixed; ... } while the keyboard is opening causes Chrome to treat it as a focus-target relayout and immediately dismisses the keyboard. useMobileScrollLock is now gated to iOS UAs.

  2. ChatView and QuickChatFAB both had an iOS-specific onTouchStart on the textarea that called event.preventDefault() and then programmatically refocused the input (to suppress iOS's visualViewport auto-scroll on re-focus). On Android, preventDefault on a textarea touchstart prevents the soft keyboard from opening — programmatic focus() alone does not raise the Android keyboard. Result: tapping the composer focused the input but the keyboard never appeared, looking like an instant dismiss. The touchstart workaround is now gated to iOS UAs via isIOS().