Fix if Firefox's Undo Close Tab feature is disabled - gHacks Tech News

Fix if Firefox's Undo Close Tab feature is disabled

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

firefox undo close tab

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:

  1. Type about:config into the address bar and hit the enter key afterwards.
  2. 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:

  • browser.sessionstore.max_tabs_undo
  • browser.sessionstore.max_windows_undo

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.

browser sessionstore

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.

Closing Words

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.

Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. pd said on September 6, 2013 at 4:58 pm
    Reply

    Running Aurora I’ve noticed the exact same behavior over the last couple of days. I thought it might be something to do with TabMixPlus but since you’re having the same problem, perhaps not.

    Unfortunately for me, neither of the prefs you mentioned were set to zero so there must be something broken in the session restore code of Firefox.

    1. Martin Brinkmann said on September 7, 2013 at 9:25 am
      Reply

      Did you try running Firefox without add-ons enabled?

      1. pd said on September 17, 2013 at 8:26 am
        Reply

        I should have been more specific. The part that no longer works for me is a button/menu I have on my toolbar that is, AFAIK, supplied by TabMixPlus. Using the drop-arrow menu of this button displays a recently-closed list and clicking on one of those items re-opens the tab. However clicking on the button itself, to reopen the last closed tab, fails.Perhaps this is some sort of pre-Australis pain or just a compatibility tweak that TMP needs to do?

        Re-opening tabs from the History menu still works and using the Ctrl + Shift + T shortcut *did* wok but just now it does not.

        Firefox 25.0a2 (2013-09-16)
        Place Maintenance 1.3
        Tab Mix Plus 0.4.1.1pre.130821a

  2. pd said on September 6, 2013 at 5:00 pm
    Reply

    Actually, the other change I made recently, that may be responsible, is to run the extension you suggested here:

    https://www.ghacks.net/2013/09/03/resolve-firefox-bookmarks-history-issues-places-maintenance/

    Perhaps there is a bug with the way that extension handles session restore related entries?

    1. Martin Brinkmann said on September 7, 2013 at 1:01 pm
      Reply

      Hm, could be. It is at least something that we both ran on our systems.

  3. Amit Kumar said on September 6, 2013 at 5:44 pm
    Reply

    Hiiiii Martin,
    thanks for sharing such a great information here, you have very beautifully mentioned about – how to Fix if Firefox’s Undo Close Tab feature is disabled. i found a detailed and impressive post here. i have learnt many thing from this post. thanks again…..!!

  4. Seban said on September 7, 2013 at 1:36 am
    Reply

    Fortunately I don’t have this problem, but thanks anyway. It’s great to see articles like this.

    “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.”
    Maybe it’s the time, but I almost started looking for the feature in Windows instead of the Firefox window. ;)

    btw another way to restore the tabs is per ctrl+shift+t

    1. Martin Brinkmann said on September 7, 2013 at 1:38 am
      Reply

      Right, corrected the upper case W to a lower case one.

  5. clas said on September 8, 2013 at 3:08 pm
    Reply

    i remember a keyboard shortcut i saw recently to re open a closed tab…if this helps… its ctrl-shift-t works in ff anyway, havent tried any other.

  6. Don Gateley said on September 15, 2013 at 8:55 am
    Reply

    “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.”

    Alt what? And from where? On my Windows 7 machine nothing at all happens when I hit Alt.

    1. Martin Brinkmann said on September 15, 2013 at 10:06 am
      Reply

      You tap on Alt while Firefox is active. It opens a menu bar, and you select History > Recently Closed Windows from it.

  7. Don Gateley said on September 15, 2013 at 8:42 pm
    Reply

    Hmm, Alt by itself does nothing on my Windows 7 machine in any context. Something must be configured wrong on my end. I was most interested in using it for Windows window history.

    1. pd said on September 17, 2013 at 8:32 am
      Reply

      Don I think Martin was referring only to Firefox, rather than any Windows 7 feature. I think I’d also be interested in a recently-closed programs or windows list at the operating system level. It does seem strange that no such functionality has ever been created that I can think of. Surprisingly a utility expert such a Nir Sofer has not thought of it. Then again, perhaps there is no such available information in the Windows APIs to support it?

      1. Martin Brinkmann said on September 17, 2013 at 8:54 am
        Reply
  8. Lynn Harris said on November 27, 2013 at 11:18 am
    Reply

    For info purposes only: I have not added ANY add-ons or extensions to FF and also NO new applications or programs to my computer and had this changed on my browser after updating to FireFox 25.0.1 on Windows Vista machine. Also noticed while browsing making changes that the ‘browser.sessionstore.resume_from_crash ‘ had been changed to false as well. (explains why my crashed session yesterday didn’t reload).

    As this is a “live comment”, I haven’t restarted FF to see if this fixes my problem, but thanks for zeroing me in on where to look…

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.