Closed Bug 1475693 Opened 6 years ago Closed 6 years ago

In a multi-select context, opening a new tab should clear the selection

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox63 --- wontfix
firefox64 --- verified
firefox65 --- verified

People

(Reporter: ablayelyfondou, Assigned: ablayelyfondou, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fixed by bug 1476844])

Currently, when a new tab is added through the add-button or shortcut (Ctrl/Cmd + T), it gets the focus but will not be part to the selection. This is inconsistent with Bug 1468443 as the active tab should belong to the selection in a multi-select context.

Now here is the desired behavior 
 1. A new tab is opened via keyboard shortcut, clear the selection.
 2. A new tab is opened via add-button:
  2.a clear the selection when Ctrl/Cmd key is not held.
  2.b add the tab to the selection when Ctrl/Cmd is held.
Holding down Ctrl while clicking the New Tab button will insert the new tab next to the currently selected (focused) tab so we shouldn't add/alter this behavior. Let's just clear the selection any time that a new tab is opened. (I said this during our video chat but most likely it didn't get heard due to our connection issues today :) )
Summary: In a multi-select context, a newly added tab with Ctrl/Cmd held must be part of the selection. Otherwise (Ctrl/Cmd not held) the selection is cleared. → In a multi-select context, opening a new tab should clear the selection
What's the expected behavior of switching tabs with keyboard? Not sure if this bug should be more generally when switching tabs, whether an existing or new tab, the selection should be cleared?

I see that clicking another tab to switch seems to clear the selection, so unless there's a keyboard shortcut to add/remove tabs to the selection, I would think the selection would get cleared whether via mouse or keyboard switching.
See Also: → 1476833
Yes, the selection should be cleared in both cases. This is an oversight and I filed here bug 1476844 to fix it.
Flags: needinfo?(jaws)
Yeah, we should clear the selection on tab switches, except for the case of a range selection where we do switch the selected tab if the last selected tab is not the current foreground tab.

For instance, given tabs A, B, and C, where tab A is the currently foreground tab and tabs B and C are unselected.
1. Ctrl-click on tab C
2. Shift-click on tab B

Expected:
Tab C becomes the foreground tab
Tabs B and C are selected, tab A is unselected
Flags: needinfo?(jaws)
Fixed through bug 1476844.
Jared, can I mark this as fixed?
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jaws)
Resolution: --- → FIXED
Yes, this is fixed. Thanks for closing it.
Flags: needinfo?(jaws)
Whiteboard: [fixed by bug 1476844]
Verified fixed in latest nightly 65.0a1(2018-11-08) and latest Beta 64.0b8 on Windows 10x64, macOS 10.13 and Ubuntu 16.04x64.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.