Change keyboard shortcut to act as a general 'undo' for last closed tab, window or session
Categories
(Firefox :: Session Restore, enhancement)
Tracking
()
People
(Reporter: sclements, Assigned: sclements)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [fidefe-firefox-view])
Attachments
(1 file)
During work on bug 1820660, I discovered that mconley had modified the Ctrl|Cmd + shift + T keyboard shortcut to restore the last session if there aren't any closed tabs to restore, per bug 1423125. However, this will not work as intended if the changes in bug 1820660 land, since it persists close tabs between sessions.
I spoke with epang about this, and he suggested we change the keyboard shortcut logic to act as a general undo, so per our slack convo:
Ctrl/Cmd+Shift+T reopens things as the user closed them. In that way, it behaves like Undo (without the time bound nature).
- So, if one tab was recently closed, Ctrl/Cmd+Shift+T reopens that.
- If the last thing closed was a window from the current session, Ctrl/Cmd+Shift+T opens the window with whatever tabs were in it.
- If the last thing closed was from the previous session, and that thing was a window of multiple tabs, Ctrl/Cmd+Shift+T opens the window with whatever tabs were in it.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
- This patch expands this keyboard shortcut to support whichever of the three
last actions were taken - last tab closed, last window closed or session restore. - Existing test file was renamed and additional cases added.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
bugherder |
Comment 4•2 years ago
•
|
||
After this bug landed, when Firefox is open Ctrl+Shift+T does not open closed tabs i have from last session
Step to reproduce:
- set Firefox to 'Open previous windows and tabs'
- on one open window open and close some tabs
- close Firefox
- open Firefox
- click Ctrl+Shift+T to open last closed tab
Result: no tab open
Comment 5•2 years ago
|
||
Thanks tabmix.onemen. I've filed that as bug 1838871.
Assignee | ||
Comment 6•2 years ago
•
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Changes existing behavior to the Command + shift + T keyboard shortcut.
[Affects Firefox for Android]: No
[Suggested wording]: The keyboard shortcut to reopen closed tabs (command + shift + t) now reopens last closed tab or last closed window, in the order items were closed. If there aren't any tabs or windows to reopen, this command restores the previous session. This change is in anticipation of upcoming changes to recently closed tabs.
[Links (documentation, blog post, etc)]: SUMO changes are tracked in bug 1841833.
Comment 7•2 years ago
|
||
Relnote added to https://www.mozilla.org/en-US/firefox/116.0beta/releasenotes/
Updated•1 years ago
|
Comment 8•7 months ago
|
||
There is one leftover key_undoCloseTab
in RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs createEntry function
if (aIndex == 0) {
element.setAttribute(
"key",
"key_undoClose" + (aIsWindowsFragment ? "Window" : "Tab")
);
}
Comment 9•13 days ago
|
||
(In reply to tabmix.onemen from comment #8)
There is one leftover
key_undoCloseTab
in RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs createEntry functionif (aIndex == 0) { element.setAttribute( "key", "key_undoClose" + (aIsWindowsFragment ? "Window" : "Tab") ); }
Fixed in bug 1868452.
Description
•