bwinton / TabCenter

Firefox add-on for arranging tabs vertically
https://testpilot.firefox.com/experiments/tab-center
208 stars 55 forks source link

Tabs in inverse order after browser restart #716

Closed alensiljak closed 7 years ago

alensiljak commented 8 years ago

I've had a few Firefox freezes recently and, after killing the process and restoring all the previously-opened windows/tabs, the tab order in TabCenter is reversed from what it originally was.

Example:

Expected result: Tabs ordered 1, 2, 3. Actual result: The tabs are ordered 3, 2, 1.

ericawright commented 8 years ago

Interesting... have you toggled the 'tabs on top' pref in options, before the crash?

alensiljak commented 8 years ago

Yes, I have once changed, several weeks ago. Then I toggled back to the default behaviour as it made more sense. Now the setting is (again) such that the new tabs appear on top when I create them manually. And with this setting the tab order is reversed on tab restore operation after crash.

alensiljak commented 8 years ago

Definitely confirming that this is the case as it has just happened again. Firefox tends to get stuck lately, requiring manually killing the process. As stated above, after the restore operation, all the previously-opened tabs will be ordered in reverse, requiring a manual reorder if I am to continue the previous flow.

ericawright commented 8 years ago

I was able to duplicate when the setting 'tabs on top' is true

note, happens on any "session restore", not just from crashing

indradhanush commented 8 years ago

Same here. However as a workaround for now, once firefox crashes, I restore the tabs and kill it again from the task manager. Next time I restore, my tabs are back in the order they were initially. ;)

alensiljak commented 8 years ago

Ahah, @indradhanush, that's a funny tab shuffle but it works. After the tabs are reversed, kill Firefox and they get reversed again. Back to the original order.

laktak commented 8 years ago

sorry for the incorrect references that were added - I had the wrong issue in a commit message and it took me a bit to sort it out ...

While I didn't test it, I think this issue should be fixed by #737 as well as it removes the handler for inserting tabs with the "Open Tabs Above" option.

SimonSapin commented 7 years ago

Will upgrading to a version with that change revert the order of existing tabs permanently?

ericawright commented 7 years ago

@SimonSapin I'm not sure I understand your question. In the new version you will still have the option to choose to have newer tabs above or below. But if you do happen to pick the "open above" option on crashes it will now restore exactly as you left it, rather than reversed.

SimonSapin commented 7 years ago

I currently have Tab Center with the the "Open Tabs Above" pref enabled. I have 172 open tabs, but let’s call it 3 and name them (top down) A, B, C.

My understanding of f4e22cf701ecd90c6e0eff0666813d1e5f2b688f is that, before that change (and in the version I currently have), this pref tweaks the insertion point of new tabs, and the tab that is "first" in the internal data structure is at the top. With this change (again if I understand correctly), insertion is now left alone, but the display is reversed with -moz-box-direction: reverse, so that the first tab internally is shown at the bottom.

So when I upgrade to a version of the extension with this change, the display order of my existing tabs will be reversed: C, B A. I’m talking about the extension upgrade here, not crashes.

Or did I misunderstand something?

ericawright commented 7 years ago

@SimonSapin Oh I see, good point. Yes, I believe at this point it may change the order of the tabs on upgrading to the new version. I'll see what we can do about that so we don't cause you and others unnecessary headache.

SimonSapin commented 7 years ago

Thanks!

indradhanush commented 7 years ago

@SimonSapin Apologies for going out of context here, but how do you manage to work with 172 tabs? My browser becomes clunky at 30+ tabs.

SimonSapin commented 7 years ago

FWIW I had over a thousand a few months ago. (Which was causing some performance problems in Tree Style Tabs.)

Most of them are not loaded, and haven’t been for a long time. I use tabs as a sort of reading list / todo list. (Of course, like every such list, it tends to grow faster than it shrinks…) So there’s maybe only 10~20 of these that I’ll use in a given day. This is why it’s important to me that recently-opened tabs are near the top, and that having the entire list reversed is disruptive. (Especially since TabCenter seems to randomly reset its scroll position to the top.)

laktak commented 7 years ago

@SimonSapin looks like this was fixed by dfbfd76

@ericawright any idea on when you'll release a new version?