You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Cmd+A does not select all text in Preview tab raw editor textarea #183
Cmd+A (select all) does not highlight/select text in the Preview tab's raw editor textarea. The textarea is a native <textarea> element, and the app's command system in command.tsx has a guard that should bail early for clipboard chords (Cmd+A/Z/C/V/X) when the target is an editable element (isEditableTarget checks target.closest("input, textarea, select")). Despite this, Cmd+A appears to be intercepted.
The raw editor uses a native <textarea> with el.addEventListener("keydown", ...) and stopPropagation() for Cmd/Ctrl chords — but the command system's handler uses capture: true on document, so it fires first in the capture phase before the element's bubble-phase listener.
Expected vs actual
Expected: Cmd+A selects all text in the textarea (native browser behavior)
Actual: Nothing happens — text is not selected
Diagnostics
The command system handler (packages/app/src/context/command.tsx:432) is registered with { capture: true } on document
Its guard at line 413: if (isEditableTarget(event.target) && isClipboardChord && !isPalette) return — should bail for Cmd+A in a textarea
isEditableTarget (line 256) checks target.closest("input, textarea, select") — should match
isClipboardChord includes "a" in its key list
A native el.addEventListener("keydown", ...) was added to the textarea with stopPropagation() but this fires in bubble phase — after the capture-phase command handler
selection:bg-blue-500/30 was added to verify selection isn't just invisible — it genuinely isn't selecting
intake: not-ready — mature per the maturity contract before picking up
suggested_path: A
diagnostics: inline
Activity