I have noticed a strange behavior in the Firefox web browser for the past two days or so. You probably know that you can undo closed tabs during a session with a right-click on the tab bar and the selection of Undo Close Tab from the context menu that opens up.
What you may also know is that this is also available for windows, so that you can restore a window that you have closed before. To do so, you need to hit the Alt-key on your keyboard, and select History > Recently Closed Windows.
Both options have not been available in my version of Firefox for the last two days at the very least. I first thought that this was because I was running the Nightly channel, knowing that errors like this could have sneaked in due to the massive amount of versions released to the channel.
A quick check however revealed that the stable version of Firefox showed the same symptoms.
Undo Closed Tab disabled
The undo feature of the Firefox web browser is defined by two preferences that you find in the browser's advanced configuration dialog. You open it the following way:
- Type about:config into the address bar and hit the enter key afterwards.
- If this is your first time, a warning page will be displayed to you that you need to accept to continue.
Now that the about:config page is open, filter for the term browser.sessionstore. A couple of options are displayed here. The two relevant for the undo feature are:
Both were set to 0 in the Firefox profile, which meant that the feature was disabled. You will notice immediately that the preference is modified if it is in bold on the page, and also by looking at the status column where user set indicates the same.
To resolve the issue, right-click on each preference and select reset from the context menu. This sets browser.sessionstore.max_tabs_undo to 10 and browser.sessionstore.max_windows_undo to 3.
What this means is that you can undo the closing of up to ten tabs and three windows in Firefox. You can increase or decrease the value as you see fit. Increasing it enables you to go back further but it may also impact the browser's memory use.
Note that you do need to restart Firefox before the new preference values take effect.
I do not know why the preferences got changed, let alone which program or extension made the change, as I did not make it. The most likely explanation is that an extension modified the preference on its own, but I cannot figure out which.