Repository navigation
An input method's Escape no longer closes boxes or discards edits - #4162
Merged
Merged
Conversation
A person typing Japanese, Chinese or Korean presses Escape to cancel the word being composed. In many boxes that Escape also ran the box's own Escape: an annotation edit was discarded, pickers, composers, dialogs, panels and searches closed. Safari sends that Escape with isComposing false and keyCode 229, so isComposing-only checks missed it. One shared check (isImeCompositionKey, holdsImeEscape) now guards the fields, the containers and window listeners above them, and the shortcut registry. Enter that confirms a composition no longer saves or picks in the boxes that lacked the check. Modal dialogs ignore the native cancel that follows an input method's Escape.
…ts for the registry, dialog holds and the Enter half In Safari a Cmd+Enter that the input method takes to accept the word arrives with keyCode 229 and isComposing false: main sends on that press, and so does compose again.
# Conflicts: # packages/inbox/components/ComposerField.tsx # packages/inbox/components/ReplyRecipient.tsx
This was referenced Nov 28, 2026
backnotprop
added a commit
to bendrucker/plannotator
that referenced
this pull request
Nov 28, 2026
…panel swipes and the HTML viewer's lost highlights ui 0.67.0 and core 0.25.35 went to npm on 2026-11-28 with package files that match the v0.29.6 tag (c21f65e), so this pair carries what merged after v0.29.6, up to v0.29.7. core 0.25.36 is additive: the linked mark "decisions" and InboxDecision.machine (backnotprop#4066), DraftFileUploader.previewUrl (backnotprop#4165), and holdingsOf no longer counting a question Mark read closed (backnotprop#4160). No exports subpath changes; nothing removed. ui 0.68.0 is a minor: Escape while an input method composes only ends the composition, and shortcuts skip such keys; holdsImeEscape is new (backnotprop#3689, backnotprop#4162). HtmlViewer treats a collapsed live Range as lost (backnotprop#4152). Compact panels: OverlayScrollArea scrollMemory, SidebarContainer closing and scrollPositions, ActionMenu compactEdgeSwipe, four new hooks and the panel rules in theme.css (backnotprop#2861). useLaunchAnnouncement waits for ready (backnotprop#4067). ui uses nothing new from core; its exact pin follows so a host gets one core. Publish core first. README and HANDOFF name the new pair, and HANDOFF adds what the published 0.25.35 / 0.67.0 already held beyond their notes (backnotprop#4114, backnotprop#4151). bun.lock is bun install's own output: the two package version lines, and six app workspace version lines (0.29.5 to 0.29.7) the release bumps left behind.
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.
If you type Japanese, Chinese or Korean, you press Escape to cancel the word you are composing. In many Plannotator boxes that same Escape also ran the box's own Escape action. The worst case: an annotation edit in the plan review panel was thrown away. In other boxes a picker, composer, dialog, card panel or search closed. Safari sends this Escape with
isComposingfalse andkeyCode229, so checks that only looked atisComposingmissed it. This builds on #3689.The shared guard:
isImeCompositionKey(inpackages/ui/utils/commentSubmitKey.ts) and a newholdsImeEscapenext to it.holdsImeEscapestops propagation withoutpreventDefault. The Inbox'sisComposingKeynow callsisImeCompositionKey. The shortcut registry (dispatchShortcutEvent) skips composing keys. Modal<dialog>s (compose, Decide, the shared InboxModal) mark an input method's Escape in the capture phase and ignore the nativecancelthat follows it (useImeCancelHold).Fixed (Escape):
@and/lists, diagram comment, diagram source pane, code file popout edit, option picker, image name, goal setup, attachments popover and path field, Settings dialog and its fields, quick label tip and emoji, comment card and dialog containers, ref hover card, plan diff exit, compact plan stage, the html viewer's iframe bridge./@#lists, reply recipient list, permission deny reason, card panel and its notes and cancel reason, action checklist note, scheduled file path, Decide dialog, shared Modal, tag rename, project rename, add tag, To picker, phone To sheet, folder menu, home folder browser, launch choice menu, review rows, plan files filter, open local picker, annotations chip edit, thread PRs popover, attachment pane comment, bottom sheet, dictation cancel, PR reply box, and the hover cards (agent faces, reactions, initiative peek, sidebar tip, contents panel).Fixed (Enter that confirms a composition no longer saves or picks): permission deny, scheduled file path, quick label tip, Settings identity and add directory, attachments path, image name, call flow search, file tree search, option picker, guide rename, tag and project rename, add tag, the
@list's tag pick, and the pickers above.Checked and found fine: Thread reply box and DecisionNoteField (#3689), CommentPopover textarea, chat window, SearchPalette, TitleFilter, ListFilterSections, the Inbox App ladders, useSheetEscape, useListPicks, SheetPage, Base UI menus (AddTagMenu Escape, BulkTags, TagColourMenu), ImageLightbox, HtmlViewer, vim hooks, MarkdownContentsRail, AnnotationToolbar line comment, ReplyRoute and StaleGuard (no text field). The compose dialog keeps main's rule for every key but Escape (only
isComposing), so in Safari a Cmd+Enter that the input method takes to accept the word still sends on that same press; only its Escape also counts keyCode 229. The other Mod+Enter sends with their own handlers (PR reply, Ask about this code, live composer) also keep theirisComposing-only check. A Mod+Enter that goes through the shortcut registry is now skipped on a keyCode 229 key, like every registry shortcut.Tests: three table-driven DOM tests (
packages/ui/components/imeEscape.composers.test.tsx,packages/review-editor/components/imeEscape.review.test.tsx,packages/inbox/imeEscape.test.tsx). Each one sends both Escape shapes and checks that the box's action did not run and its words are intact, then sends a plain Escape and checks that the action does run. All of them fail with the Safari shape when the guard is turned off. Also covered: the registry's early return (packages/ui/shortcuts.test.ts); the hold on the close that follows an IME Escape, for the shared Inbox dialog and Decide (packages/inbox/imeDialogCancel.test.tsx); and the Enter half (an IME Enter does not save, a plain Enter does) for the quick label tip, Settings identity, Settings add directory, attachment path and scheduled thread file path. One more test inpullAllFiles.test.tsxcovers a gap the reviewer found in #3689: picking the scope that is already on starts no focus watcher.Not verified: a real Android device must still confirm whether Gboard or Samsung Keyboard ever send
key'Enter' with keyCode 229 andisComposingfalse. If they do, that Enter is now taken as the input method's and does nothing. That matters most for the Done key on tag rename and project rename, where Enter is the only way to save (leaving the field cancels). A second Enter, sent as keyCode 13, saves. Also not verified: a real input method in a real browser. The Safari keyCode-229 path and the native dialogcancelafter an input method's Escape were not tried in real Safari or Chrome; they are covered by happy-dom DOM tests only.