Repository navigation
fix: leave Enter and the arrows to the IME while the search box is composing - #523
Merged
brendt merged 1 commit intoOct 19, 2026
Conversation
…mposing While an input method editor composes a word (Japanese, Chinese, Korean), the arrows move through its candidates and Enter confirms the word. The browser still delivers those keydowns to the page, flagged `isComposing`, and the search dialog acted on them: the arrows moved the active result, and Enter opened it. With a provisional query that matches nothing, the options fall back to the suggested searches, so the Enter that confirmed the word replaced it with "shipping a side project"; when picking a recipient for a remote, it picked whichever developer the half-typed name matched. Ignore the keys while composing, as the issue command, the mention textarea and the conversation thread already do, so the IME keeps them. The test calls the component with mocked hooks, like the composer tests, and drives the input's handler: composing Enter and ArrowDown leave the value and the active option alone and never prevent the default, while the same keys without composition still move the selection and pick the suggestion. 🤖 Generated with Claude Code
jubianchi
marked this pull request as ready for review
October 18, 2026 22:35
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While an input method editor composes a word (Japanese, Chinese, Korean), the arrows move through its candidates and Enter confirms the word. The browser still delivers those keydowns to the page, flagged
isComposing, and the search dialog'sonKeyDownacted on them, unlike the issue command, the mention textarea and the conversation thread, which already checkevent.nativeEvent.isComposing.Type
nihongowith a Japanese IME and press Enter to confirm日本語: the provisional query matches nothing, so the options are the suggested searches, and that Enter replaces the word with "shipping a side project". When picking a recipient for a remote, it picks whichever developer the half-typed name matched. The arrows move the active result instead of the IME's candidates.Checked locally with keydowns dispatched with
isComposing: trueon the empty dialog:The same keys without composition keep working after the change.
Changes
onKeyDownreturns early while composing, so the IME keeps the keys.tests/Unit/SearchDialogComposition.test.tsx, red before and green after: composing Enter and ArrowDown leave the value and the active option alone and never prevent the default; the plain keys still move the selection and pick a suggestion.tests/draft-images.config.tsandtests/tsconfig.json; trivial conflicts with test: run the ten component tests that CI never ran #492 and fix: refresh the shared clock when the first component subscribes again #517, which touch the same lists.