Skip to content

fix: Fix Enter key blocked after dismissing empty suggestion popup#1471

Merged
charlesvien merged 2 commits intomainfrom
04-02-fix_enter_key_blocked_empty_suggestion_popup
Apr 3, 2026
Merged

fix: Fix Enter key blocked after dismissing empty suggestion popup#1471
charlesvien merged 2 commits intomainfrom
04-02-fix_enter_key_blocked_empty_suggestion_popup

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 2, 2026

Problem

Pressing Escape on a suggestion popup with no results hides it visually but leaves the Tippy DOM node mounted, causing the Enter-to-submit handler to think a suggestion is still active.

Changes

  1. Track dismissed flag in CommandMention and FileMention suggestion renderers
  2. Return false from onKeyDown when dismissed so Enter propagates normally
  3. Return false from SuggestionList when no item is selected instead of swallowing the event
  4. Check for visible Tippy box (data-state not hidden) instead of just DOM presence
  5. Reset dismissed flag when new non-empty suggestions arrive

How did you test this?

Manually

@charlesvien charlesvien changed the title Fix Enter key blocked after dismissing empty suggestion popup fix: Fix Enter key blocked after dismissing empty suggestion popup Apr 2, 2026
@charlesvien charlesvien marked this pull request as ready for review April 2, 2026 22:21
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch from a92e5cb to f8e0608 Compare April 2, 2026 22:38
@charlesvien charlesvien force-pushed the 04-02-active_file_external_app_fix branch from 0851b92 to d21da9b Compare April 2, 2026 22:38
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch from f8e0608 to b6525f2 Compare April 2, 2026 22:55
@charlesvien charlesvien force-pushed the 04-02-active_file_external_app_fix branch from d21da9b to acf7ecf Compare April 2, 2026 22:55
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch from b6525f2 to b450f66 Compare April 2, 2026 22:56
@charlesvien charlesvien force-pushed the 04-02-active_file_external_app_fix branch 2 times, most recently from 25abfee to 8236097 Compare April 2, 2026 22:57
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch 2 times, most recently from 121d6bb to ad9e547 Compare April 2, 2026 23:33
@charlesvien charlesvien force-pushed the 04-02-active_file_external_app_fix branch from 8236097 to 71fc7d5 Compare April 2, 2026 23:33
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch from ad9e547 to ed7b176 Compare April 3, 2026 00:56
@charlesvien charlesvien force-pushed the 04-02-active_file_external_app_fix branch from 71fc7d5 to 1242182 Compare April 3, 2026 00:56
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 3, 2026

Merge activity

  • Apr 3, 1:05 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 3, 1:19 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 3, 1:25 AM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-02-active_file_external_app_fix to graphite-base/1471 April 3, 2026 01:12
@charlesvien charlesvien changed the base branch from graphite-base/1471 to main April 3, 2026 01:18
@charlesvien charlesvien force-pushed the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch from ed7b176 to 4f832dd Compare April 3, 2026 01:19
@charlesvien charlesvien merged commit 5f5c438 into main Apr 3, 2026
16 checks passed
@charlesvien charlesvien deleted the 04-02-fix_enter_key_blocked_empty_suggestion_popup branch April 3, 2026 01:25
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