Closed Bug 1833416 Opened 11 months ago Closed 10 months ago

Change keyboard shortcut to act as a general 'undo' for last closed tab, window or session

Categories

(Firefox :: Session Restore, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
relnote-firefox --- 116+
firefox116 --- fixed

People

(Reporter: sclements, Assigned: sclements)

References

(Depends on 1 open bug, Blocks 3 open bugs, Regressed 1 open bug)

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.
Blocks: 1827393
Assignee: nobody → sclements
Status: NEW → ASSIGNED
  • 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.
Attachment #9336534 - Attachment description: Bug 1833416 - modify undoClosedTab keyboard shortcut r=mconley,sfoster → Bug 1833416 - modify undoClosedTab keyboard shortcut r=mconley
Pushed by sclements@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a44656c2ad83
modify undoClosedTab keyboard shortcut r=mconley,sfoster,sessionstore-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

After this bug landed, when Firefox is open Ctrl+Shift+T does not open closed tabs i have from last session

Step to reproduce:

  1. set Firefox to 'Open previous windows and tabs'
  2. on one open window open and close some tabs
  3. close Firefox
  4. open Firefox
  5. click Ctrl+Shift+T to open last closed tab

Result: no tab open

Regressions: 1838871

Thanks tabmix.onemen. I've filed that as bug 1838871.

Regressions: 1839093
Blocks: 1841833

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.

relnote-firefox: --- → ?
Regressions: 1844791
Regressions: 1846549
Blocks: 1846549
No longer regressions: 1846549
Regressions: 1868452
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: