Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Recently closed windows" greyed out after restart #132

Closed
ErikvO opened this issue Oct 19, 2023 · 3 comments
Closed

"Recently closed windows" greyed out after restart #132

ErikvO opened this issue Oct 19, 2023 · 3 comments

Comments

@ErikvO
Copy link

ErikvO commented Oct 19, 2023

When Undo Close Tab is installed/enabled, the Recently closed windows menu in the History menu is always greyed out after starting Firefox.
It works while Firefox is not closed, but after the next restart, the menu is greyed out again.

This is especially annoying when Firefox is set to reopen the previous session, but windows were closed in the wrong order. IE: main window first, popup window last. In this case, the popup window will be restored and there is no way to reopen the main window with all open tabs.

When I disable Undo Close Tab, the Recently closed windows menu works again after restarting Firefox.

@M-Reimer
Copy link
Owner

That's because of a bug in Firefox that isn't fixed for months. You can either have the built in menu work or an Add-on.

I have to use a workaround to make the API for closed tabs reliable. I copy the list in Firefox in my own memory and then clear it. This is to prevent IDs from duplicating.

But basically your issue is duplicating #79
Maybe we should move any discussion about this topic there.

@M-Reimer
Copy link
Owner

OK, actually I was a bit optimistic with "for months". It isn't fixed since around 5 years actually... 😞
https://bugzilla.mozilla.org/show_bug.cgi?id=1538119

I think I've explained the issue several times, now, but in a nutshell:
To access closed tabs, Mozilla uses an "ID" which is basically a rising counter starting with the browser start. When a new tab is closed, this counter is increased by one and added to the newly closed tab as its ID.
The problem with this: As soon as you restart the browser, the ID counter starts from zero, again. So now ID "1" could point to a tab of the previous session and the current session making it random which one you restore when clicking the "Restore Tab" button.

To work around this problem, I clear the Firefox internal list to force the IDs to actually be unique, as they now can only point to tabs from the current session.

So far I have not found any way to create a better workaround and it seems like the bug in Firefox does not really get much attention.

@ErikvO
Copy link
Author

ErikvO commented Oct 23, 2023

Thank you for your reply.

I have indeed seen the bug that has been created 22nd of march 2019 and still has not been fixed. I've been a fan of Firefox since it was still called Phoenix/Firebird, but is seems it is declining nowadays, as it cannot keep up with Chromium-based browsers. I do not have a a lot faith that this bug will get fixed in the near future.

As I value my open tabs more than I value the convenience of opening a closed tab with a button instead of doing it via the context menu, I will unfortunately keep your extension disabled until Mozilla fixed the bug. It's a pity though, I really like your extension.

Thank you for your work. I hope to be able to use it once more in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants