Repository navigation
Keep physical keys out of the mobile terminal while a gesture confirmation is open - #1504
Merged
Merged
Conversation
…s open The Send ⌃C? and Paste? dialogs take no focus, so a physical Enter pressed to answer one went to the Session as a newline and left the dialog open.
Deploying mouseterm with
|
| Latest commit: |
462cc5b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e09532f5.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-mobile-confirm-dialog-ke.mouseterm.pages.dev |
Main narrowed the physical-keyboard listener to terminalInteractive, for a shown browser. Keep that and this branch's confirming check on the same listener. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
On a phone or iPad with a physical keyboard, keys typed while the radial menu's Send ⌃C? or Paste? confirmation is open went straight to the terminal. The dialog takes no focus, so focus stays on the body, and the window
keydownlistener inMobileTerminalUi(MobileTerminalUi.tsx#L804) checked only the composer and the view. Pressing Enter to answer the dialog sent a newline to the Session and left the dialog open. The bug came in with the physical-keyboard path in #1495.The listener, and the native-paste listener next to it, now stand down while a confirmation is pending, the same way they already do for the composer and the Sessions screen. The dialog is
aria-modal, so nothing behind it should take input. The "Physical keyboard" rule indocs/specs/mobile-terminal-ui.mdnow names that condition.A new test in
MobileTerminalUi.test.tsxopens the ⌃C confirmation and presses Enter. It fails onmainbecause the key is sent, and passes with this change. The fullMobileTerminalUisuite, the lib typecheck, and the spec lint pass.