Closed Bug 748666 Opened 14 years ago Closed 1 year ago

When closing tabs, the focus should return to the last viewed tab

Categories

(Firefox :: Tabbed Browser, defect)

12 Branch
x86
All
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: limweizhong, Unassigned)

References

Details

(Keywords: ux-efficiency, Whiteboard: [fidefe-quality-foundation])

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 Build ID: 20120420145725 Steps to reproduce: Close a tab. Actual results: 1. There is a global property of the browser window which stores either the owner, ownerTab or "related tab" (at least as specified in addTab) of the current tab, but this is reset to nothing every time the current tab changes. This is used to determine which tab would be focused when the current tab closes. 2. If the above property is nothing, then the focus switches to the tab on the right. Expected results: { // Definitions Let T be the closing tab. Let A be some ordering of the tabs, either: a. by first opened time (when it appeared in the tab bar) b. by last navigation initiation time (when the page started loading) c. by last viewed time (as in the ctrlTab previews) Let O(X) be the owner of tab X. } Method of focusing tab after closing T: 1. Always switch to the tab on the *left* of T. 2. Switch to first unclosed tab in A. 5. Switch to O(T). If there isn't any owner, switch to first unclosed tab in A. 6. Assuming the owner relationships form a tree, with child-nodes ordered by A, switch to the last tab in the subtree rooted at T, or if there is none, switch to that of O(T). * - you recursively take the last sibling if it exists. I prefer method 2 with order c, which is currently made available in Tab Mix Plus, under "Events > Tab Closing > Closing Current Tab". I think it should be transferred from TMP to the Firefox main branch.
Component: Untriaged → Tabbed Browser
Keywords: ux-efficiency
Duplicate of bug 565570. Depends on bug 578327.
Hmm but the current behavior is as I mentioned. The most irritating part about it is that if I open tab B from tab A, then I open tab C from tab B, then I close tab C, it returns to tab B (expected), but when I close tab B, it does *not* return to tab A (as predicted by my post above).
Oh I also found something unexpected. If I open tabs B and then C from A in the background, then I switch to tab C and close it, I do *not* return to tab A or B. instead I get focused on the tab on the right of C.
From Frank: "To illustrate why, imagine the disorientation of having the first of 20 or even 100 tabs selected, opening a new tab with the new tab button, browsing for a bit, opening some links in new tabs, closing those and their opener, and watching the tab container scroll all the way back to the first tab." In my opinion, this should really be the behavior, signalling to the user that he's really done browsing the new tabs, and getting him back to the tabs he were at previously. It should be the tab container's responsibility to make this scrolling fast -- which it probably is (but I can't check as I have no minimum tab width).
OS: Windows XP → All
Severity: normal → S3
See Also: → 1811162
Whiteboard: [fidefe-quality-foundation]
Assignee: nobody → rking
See Also: → 345028

I've discussed this with misha from UX and they've decided to leave this as is.

Way back in the day when the current behavior was designed, I remember there was this use case that was deemed important: Say you're reading an article with a bunch of references that you open in background tabs (e.g. via middle clicking on links), which you'd like to move on to once you're done with the article. In that case it was decided we should break the tab ownership chain, i.e. not go back to the previous tab, but instead to the one you opened first from the current tab, i.e. the tab right next to it.

In theory we could maintain the above behavior (breaking the ownership chain when opening a background tab) while not breaking the chain when just switching tabs, as this bug suggests, but it's unclear that users will always remember the ownership especially when switching multiple times, so going to the tab right from the closing tab seems more straightforward and predictable.

Assignee: rking → nobody
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
Duplicate of this bug: 2014575
You need to log in before you can comment on or make changes to this bug.