Parent epic: #268. Top-level webview epic: #264. Release epic: #227.
Proven gap
After unchanged Code OSS calls frame.contentWindow.focus(), the child document correctly owns focus with BODY active, but native keyboard dispatch still selects the top-level realm when no native element is active. Sequential Tab order is also computed only from the current document root, so focus cannot enter and leave nested webviews in browser order.
Focused implementation
- Route keyboard events through the tracked focused child browsing context while its
BODY is active.
- Build sequential focus order across the unified top-level DOM so Tab and Shift+Tab cross iframe boundaries.
- Start forward traversal at the first inner control after child
Window.focus() and reverse traversal at the preceding outer control.
- Preserve existing key/code/keyCode/modifier/repeat/trust fields and honor
preventDefault() before the focus default action.
- Add a Code-shaped trusted Ctrl+F handoff regression and a browser/native cross-frame Tab contract.
Acceptance and deferred gates
Execution is deferred under the current implementation-first direction.
Parent epic: #268. Top-level webview epic: #264. Release epic: #227.
Proven gap
After unchanged Code OSS calls
frame.contentWindow.focus(), the child document correctly owns focus withBODYactive, but native keyboard dispatch still selects the top-level realm when no native element is active. Sequential Tab order is also computed only from the current document root, so focus cannot enter and leave nested webviews in browser order.Focused implementation
BODYis active.Window.focus()and reverse traversal at the preceding outer control.preventDefault()before the focus default action.Acceptance and deferred gates
346f1412432f582ee8fd80942975075f031b06c5.git diff --checkpassed.Execution is deferred under the current implementation-first direction.