fix: forward terminal taps to mouse-tracking apps #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mobile-terminal-taps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cause
The manual-keyboard fix installed a capture-phase
mousedownhandler on the terminal that called bothpreventDefault()andstopPropagation(). xterm uses that mousedown for two things:Stopping propagation prevented the second as well, so TUI buttons never received a click.
Fix
The handler now:
preventDefault()on coarse pointers, so the browser does not move focus;stopPropagation(), so xterm receives the mousedown and sends the SGR/X10 report;The keyboard remains manual, but taps reach mouse-tracking applications.
Verification
npm run buildnpm run typecheckdprint checkgit diff --checkCSI ? 1000 h+CSI ? 1006 h:\x1b[<0;25;17M/\x1b[<0;25;17m;\x1b[<0;24;17M/\x1b[<0;24;17m;document.activeElementstayedBODY, so the keyboard did not open.The portal was not rebuilt or restarted.