Closed
Bug 1476844
Opened 6 years ago
Closed 6 years ago
In a multi-select context, clear the selection when switching tab via keyboard shortcuts Ctrl-t/Cmd-1
Categories
(Firefox :: Tabbed Browser, defect, P3)
Firefox
Tabbed Browser
Tracking
()
VERIFIED
FIXED
Firefox 63
People
(Reporter: ablayelyfondou, Assigned: ablayelyfondou, Mentored)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
When switching tabs with mouse click, selection is cleared. This same behavior should be applied to tab-switch with keyboard shortcuts too.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ablayelyfondou
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8993984 [details] Bug 1476844 - Clear selected tabs whenever 'TabSelect' event is fired except when switching tab from 'switchToNextMultiSelectedTab' function in /browser/base/content/tabbrowser.js. https://reviewboard.mozilla.org/r/258538/#review265570 ::: browser/base/content/test/tabs/browser.ini:24 (Diff revision 2) > support-files = > test_bug1358314.html > [browser_isLocalAboutURI.js] > [browser_multiselect_tabs_active_tab_selected_by_default.js] > [browser_multiselect_tabs_bookmark.js] > +[browser_multiselect_tabs_clear_selection_when_tab_switch.js] An oversight from https://reviewboard.mozilla.org/r/255554/diff/2#index_header. None of Gijs and I saw this.
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8993984 [details] Bug 1476844 - Clear selected tabs whenever 'TabSelect' event is fired except when switching tab from 'switchToNextMultiSelectedTab' function in /browser/base/content/tabbrowser.js. https://reviewboard.mozilla.org/r/258542/#review265742 ::: browser/base/content/tabbrowser.js:154 (Diff revision 2) > > _multiSelectedTabsSet: new WeakSet(), > > _lastMultiSelectedTabRef: null, > > + _clearMultiSelectionIsLocked: false, _clearMultiSelectionLocked ::: browser/base/content/tabbrowser.js:3678 (Diff revision 2) > - let selectedTabs = ChromeUtils.nondeterministicGetWeakSetKeys(this._multiSelectedTabsSet) > + let selectedTabs = ChromeUtils.nondeterministicGetWeakSetKeys(this._multiSelectedTabsSet) > - .filter(tab => tab.isConnected && !tab.closing); > + .filter(tab => tab.isConnected && !tab.closing); > - let length = selectedTabs.length; > + let length = selectedTabs.length; > - gBrowser.selectedTab = selectedTabs[length - 1]; > + gBrowser.selectedTab = selectedTabs[length - 1]; > + } > + this._clearMultiSelectionIsLocked = false; Can you wrap the above lines in a try/catch and log any exception that gets thrown? Then after the catch you can reset this to false, so we make sure the lock doesn't get stuck to true.
Attachment #8993984 -
Flags: review?(jaws) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8993984 [details] Bug 1476844 - Clear selected tabs whenever 'TabSelect' event is fired except when switching tab from 'switchToNextMultiSelectedTab' function in /browser/base/content/tabbrowser.js. https://reviewboard.mozilla.org/r/258542/#review265742 Patch rebased and updated.
Assignee | ||
Comment 7•6 years ago
|
||
Hey Jared would you like to push this please!
Flags: needinfo?(jaws)
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/697a32f394b2 Clear selected tabs whenever 'TabSelect' event is fired except when switching tab from 'switchToNextMultiSelectedTab' function in /browser/base/content/tabbrowser.js. r=jaws
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/697a32f394b2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Updated•6 years ago
|
Flags: needinfo?(jaws)
Comment 10•6 years ago
|
||
I have reproduced this bug with Nightly 63.0a1 (2018-07-18) on Windows 10, 64 Bit! This bug's fix is verified with latest Nightly! Build ID 20180815100249 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
QA Whiteboard: [bugday-20180815]
Comment 11•6 years ago
|
||
Hello, 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 but only for CTRL-t combination of keys. is CTRL-1 disabled?
Flags: needinfo?(jaws)
Comment 12•6 years ago
|
||
Using Ctrl-1 through Ctrl-9 should also work to clear the selection. On Mac it would be Cmd-1 through Cmd-9.
Flags: needinfo?(jaws)
Comment 13•6 years ago
|
||
Verified fixed with 65.0a1 (2018-11-12)and 64.0b9 on Win 10x64 and macOS 10.13. I have noticed that the CTRL-1 through CTRL-9 does nothing on the Ubuntu platform. Should I open a separate ticket for this issue?
Flags: needinfo?(jaws)
Comment 14•6 years ago
|
||
According to https://searchfox.org/mozilla-central/source/browser/base/content/browser-sets.inc#298, on Ubuntu you will need to use Alt instead of Ctrl. So Alt-1 through Alt-9 should be the equivalent Ubuntu key combinations.
Flags: needinfo?(jaws) → needinfo?(vlad.lucaci)
Comment 15•6 years ago
|
||
Confirming the above information from Comment 14. Closing ticket as verified fixed for Ubuntu platform as well. thank you Jared
Status: RESOLVED → VERIFIED
status-firefox64:
--- → verified
status-firefox65:
--- → verified
Flags: needinfo?(vlad.lucaci)
You need to log in
before you can comment on or make changes to this bug.
Description
•