Repository navigation
Context: don't commit a name on an IME composition Enter - #1279
Closed
wonjangcloud9 wants to merge 1 commit into
Closed
wonjangcloud9 wants to merge 1 commit into
wonjangcloud9 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for taking the time to contribute. This pull request was automatically closed because:
Please update the pull request to meet these automatic checks, then reopen it. Passing these checks does not guarantee acceptance; maintainers still determine whether a change is obviously correct and trivially verifiable. If an exception is appropriate, a maintainer can apply the |
3 tasks done
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.
Important
We are not generally accepting outside contributions. We may accept a small
change only when, in the maintainers' assessment, it is obviously correct and
trivially verifiable by reading the patch.
If you found a bug, please file an issue
first. For feature requests and other proposals, please
open a discussion.
What does this change?
#280 and #291 stopped the Workshop from treating an IME's composition Enter as "submit". The Context Library (
packages/gatekeeper-context) didn't get that guard: its name and rename inputs still act on every Enter and Escape.With a Korean IME on macOS Chrome, pressing Enter to finish the last syllable sends two
keydownevents. The first hasisComposing: true/keyCode 229, the second is a normal Enter. So naming a collection in Korean and pressing Enter can callcreate()twice, and a rename can commit before the last syllable lands. Escape ends a composition the same way, so it also cancels the rename inputs.This adds the check
isImeComposing()already uses in the Workshop (nativeEvent.isComposing || nativeEvent.keyCode === 229) to the 7 handlers: the name field inCreateCollectionDialogandEditCollectionDialog,RenameInput, and inContextLibraryPagethe new-collection name, branch field, inline rename and file-name inputs.Why is this obviously correct and trivially verifiable?
Each change only adds an early return, or an extra
&&condition, for a key event that belongs to an active IME composition. That condition is the same one asworkshop-frontend/src/keyboardEvent.ts, which #291 reviewed. Nothing changes for any other key event. The check is written inline becausegatekeeper-contextdoesn't depend onworkshop-frontend. 7 lines added, 4 changed, no new code paths.Checklist
Checking every item does not guarantee acceptance. Maintainers determine whether
a pull request meets the contribution policy.
🤖 Generated with Claude Code