Repository navigation
fix(shortcuts): don't swallow f while typing in script editors - #36
Merged
Merged
Conversation
The Frame Selection hotkey bound bare f globally and only skipped native input/textarea. Monaco 0.52+ focuses a DIV inside .monaco-editor (EditContext), so typing function in a custom script produced unction. Fixes #34
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.
Fixes #34 — typing
functionin a custom-script trigger producedunctionbecause the Frame Selection hotkey (f) ran on a document capture-phase listener andpreventDefault'd the key.The old gate only skipped native
<input>/<textarea>/contenteditable. Monaco 0.52+ (what the Trigger Editor uses) focuses aDIV.native-edit-contextinside.monaco-editorvia Chromium's EditContext API, so the gate missed it.Changes
isTypingTarget()helper that also treats.monaco-editor/.native-edit-context/[role=textbox]as typing, and checksdocument.activeElementas well ase.target.f,m,1/2/3, Tab, Delete) also stay quiet while an editor dialog is open — same list Delete already used — so a focused trigger tree can't yank the camera either.Verify
cd frontend && npm run check— 0 errors (pre-existing a11y/state-ref warnings only)cd frontend && npm run build— cleanfunctionin the pane; all six letters insert. Barefstill frames the selection when the viewport has focus.@claude Please review this PR, also check for security vulnerabilities