feat: Preserve tab owner for back-to-close#11240
Closed
KyleKincer wants to merge 1 commit intozen-browser:devfrom
Closed
feat: Preserve tab owner for back-to-close#11240KyleKincer wants to merge 1 commit intozen-browser:devfrom
KyleKincer wants to merge 1 commit intozen-browser:devfrom
Conversation
Maintains tab.owner in three key scenarios to ensure back-to-close always returns to the opener tab: 1. Background tab opens (Ctrl+Click, middle-click): Now sets owner even for background tabs 2. Tab switching: Owner no longer cleared when switching between tabs 3. Related tab chains: All tabs in a chain keep their owner Testing workflow: - Ctrl+Click link → switch to new tab → press back → should return to original tab - Open multiple tabs from same page → all should return to that page on back - Switch between tabs multiple times → back should still work b=no-bug, c=tabs
mr-cheffy
reviewed
Nov 10, 2025
Member
mr-cheffy
left a comment
There was a problem hiding this comment.
Im not comfortable changing how owners work here since it might even lead to memory leaks. Could you please show me examples or videos where the owner gets reset and it doesn't on arc?
Contributor
Author
Sure. Here are the two main ones that I run into.
issue1.mp4
issue2.mp4 |
Member
|
I'll move this into #11267 |
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.
I was testing on Twilight and Firefox is aggressively removing tab owners in some cases. These changes attempt to maintain persistent tab owner relationships to enable consistent back-to-close behavior similar to Arc Browser.
Changes
Modified
tabbrowser.jsin 3 places:Testing
b=no-bug, c=tabs