Repository navigation
fix(browser): open Ctrl+click and middle-click links in a new tab - #446
Merged
amirlehmam merged 1 commit intoNov 9, 2026
Merged
Conversation
Chromium reports both gestures as a 'background-tab' window-open request, which the browser pane used to turn into an in-place navigation. Main now routes that disposition to the window hosting the guest, and the pane adds a browser tab beside it without switching to it, as a browser would. The side panel has no tabs, so it uses the same destination as the right-click "Open link in new tab" (amirlehmam#439).
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.
Ctrl+click or middle-click on a link in a browser tab used to replace the current page. Now the link opens in a new browser tab next to the current one, and you stay on the page you clicked.
Chromium reports both clicks as a
background-tabwindow-open request.webviewWindowOpenPolicysends that request to its own new-tab path. Main then tells the host window which guest asked, the same wayBROWSER_GUEST_KEYdoes, and the pane hosting that guest adds the tab. It reuses theonOpenInNewTabpath from the right-click menu (#439).Design choices:
background-tabgets the new path. Ctrl+Shift+click arrives asforeground-tab, the same as a page's ownwindow.open(), so it still opens in place.