Repository navigation
Take the iframe leader chord only from the frame holding focus - #1556
Merged
Merged
Conversation
A framed page shares its shim's origin and can post the leader message with no gesture, so a page in a background pane could end passthrough on the terminal being typed into and turn the typed keys into shortcuts. The leader channel and the press report now share one check, isFromFocusedFrame: the message's source must be the frame holding this document's focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The leader listener's only reason for a registry of live origins was accepting any grant, and only the frame holding focus may now send it. Its panel already hears that frame, so leader and pointerdown share one test there: this panel's frame, holding focus. That also restores the tie to the panel, which a check against whichever frame holds focus had dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
411ad66
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a408fc88.mouseterm.pages.dev |
| Branch Preview URL: | https://iframe-leader-focus-gate.mouseterm.pages.dev |
dormouse-bot
approved these changes
Nov 3, 2026
This was referenced Nov 4, 2026
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.
The leader chord now counts only from the frame holding focus, as a press report already does.
A framed page shares its shim's origin, so it can post any shim message with no gesture.
leaderended passthrough for any live proxy origin, so a page in a background pane could take the terminal being typed into out of passthrough, and the typed keys then acted as command-mode shortcuts.One gate, in the panel.
IframePanel's listener now answersleaderas well aspointerdown, and both pass one test: the sender is this panel's frame, and that frame holdsdocument.activeElement. A message from any other frame moves no focus, selection, or mode. The Wall's second window listener and the registry of live proxy origins, which only that listener read, are gone.S303covers both messages.The other shim messages stay ungated.
location,navigate,open-window, andtheme-requestreach only the sender's own pane: its header, its URL behind the same external-origin gate, a prompt that takes no keyboard and needs a click, and read-only theme values. None reaches selection or mode.What this does not change. The gate cannot tell the shim from the page, so a page that holds focus can still post
leader.docs/specs/security.md-> "Known gaps" now says so, next to the line on a frame focusing itself.Testing
pnpm testat the root andtsc -binlibpass. One earlier root run failed on a connection reset in a relay transport test, which this PR does not touch; the relay package passed alone, and the root suite passed on rerun.innerdogfood, with real key events:-split a pane.-reaches the terminal.-splits a pane.Not run: the shipped Tauri and VS Code apps, and any WebKit build, for this change.
🤖 Generated with Claude Code