Skip to content

fix(flow-chat): improve Shift+Tab input exclusion and remove redundant handler#829

Merged
GCWing merged 2 commits into
GCWing:mainfrom
jarvis24young:fix/shift-tab-input-exclusion
May 22, 2026
Merged

fix(flow-chat): improve Shift+Tab input exclusion and remove redundant handler#829
GCWing merged 2 commits into
GCWing:mainfrom
jarvis24young:fix/shift-tab-input-exclusion

Conversation

@jarvis24young
Copy link
Copy Markdown
Contributor

Summary

  • Extend mobile document-level Shift+Tab exclusion to cover INPUT, SELECT, and contentEditable elements — not just TEXTAREA — preventing unintended agent mode cycling while typing in any form field
  • Remove redundant Shift+Tab handler from the textarea's React onKeyDown since the document listener already handles it with proper exclusion
  • Remove an unnecessary comment from the desktop ChatInput Shift+Tab handler

Test plan

  • Shift+Tab in INPUT/SELECT/contentEditable does not trigger mode cycling
  • Shift+Tab in TEXTAREA does not trigger mode cycling
  • Shift+Tab outside form elements still cycles agent modes

…t handler

- Extend document-level Shift+Tab exclusion to cover INPUT, SELECT, and
  contentEditable elements, not just TEXTAREA, preventing unintended mode
  cycling when typing in any form field
- Remove redundant Shift+Tab handler from textarea React onKeyDown since
  the document listener handles it with proper exclusion
- Remove unnecessary comment explaining what the code already expresses
…ling

The textarea handler and document listener serve different purposes:
- Textarea handler: Shift+Tab in the editable chat input → cycle mode
- Document listener: Shift+Tab when input is collapsed → cycle mode
  (with TEXTAREA exclusion to prevent double-fire)

Removing the textarea handler meant Shift+Tab in the expanded textarea
would be consumed by the document listener instead, which is less direct
and breaks the expected UX of Tab-based mode switching while typing.
@GCWing GCWing merged commit ca10fb4 into GCWing:main May 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants