Repository navigation
fix(browser): unstick Ctrl+Tab switcher when opened from a focused browser guest - #9966
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughUpdated Ctrl+Tab guest shortcut handling so the initial keydown no longer calls 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Electron suppresses guest keyups after a prevented Ctrl+Tab keydown, so the MRU switcher never received ui:ctrlTabKeyUp and stayed stuck open (stablyai#9937). Match the main-window path: forward the chord without preventDefault. Co-authored-by: Cursor <[email protected]>
Contributor
|
Thanks so much for this, @Fazalkadivar21 — unstick Ctrl+Tab switcher when opened from a focused browser guest. Reviewed, rebased on latest |
5 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…owser guest (stablyai#9966) Co-authored-by: Cursor <[email protected]>
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.
Summary
Fixes the in-app browser's Ctrl+Tab tab switcher, which opened the MRU overlay but never committed or closed it, leaving it stranded on screen.
ELI5
When you pressed Ctrl+Tab inside the built-in browser, the "switch tab" popup would appear and then get stuck open. Now it closes and switches tabs the way it should.
Root cause & fix
In
setupGuestShortcutForwarding(src/main/browser/browser-guest-ui.ts), the recent-tab-switcher chord handler calledevent.preventDefault()on the Ctrl+Tab keydown. In Electron, callingpreventDefault()on the Tab keydown suppresses the subsequent Control keyup, so the overlay never received its commit keyup and stayed open. The fix removespreventDefault()from the keydown path (the commit keyup path still calls it), matching the existing main-window behavior increateMainWindow.ts.Evidence
Validated & rebased onto latest main during a bug-bash triage on 2026-07-23.
src/main/browser/browser-guest-ui.test.ts,src/main/browser/browser-manager.test.tsbrowser-guest-ui.test.ts:502andbrowser-manager.test.ts:2602, both assertingexpect(keyDownPreventDefault).not.toHaveBeenCalled().npx oxlint src/main/browser/browser-guest-ui.tsreports no findings.Trade-offs
None — pure fix.
Regression risk
Zero-regression: only the guest Ctrl+Tab keydown branch changes by dropping one
preventDefault()call; the commit keyup path and all other input forwarding remain byte-identical, and the two updated unit tests prove both the fixed behavior and its absence when reverted.Credit to original author @Fazalkadivar21. Validated, rebased, and (where applicable) hardened via automated bug-bash review; original fix design preserved.