joelspadin / ClassicTabs

Opera 15+ extension to bring back tab behaviors from Opera 12.
BSD 2-Clause "Simplified" License
25 stars 5 forks source link

total tab reversal with SessionManager #27

Open ClaireCJS opened 7 years ago

ClaireCJS commented 7 years ago

Hi,

I use SessionManager to restore my tabs, because Opera doesn't handle that perfectly over the long term.

I had to install Classic Tabs when Opera upgraded in such a way that an unrelated bug manifested. (Search by image would open the results in the first unpinned tab, instead of the next tab. Only fix is to downgrade Opera, but Opera auto-upgrades, thus I installed Classic Tabs to make the image results always be the next tab, like they were in the past.)

So I restored a window with a lot of tabs. Now they are all backwards! Except for the pinned ones. I think SessionManager must restore the tabs in right-to-left order, so that Classic Tabs then re-arranges each one as it appears, resulting in a completely backwards tab restoral!

A simple bugfix would be an option for Classic Tabs to start up disabled. (Tab restoral takes about 20 minutes for me....) A more complex bugfix would be to detect when tabs are being restored by Session Manager.

I am not sure how to work around this.

joelspadin commented 7 years ago

ClassicTabs is currently designed to delay for 1 second after startup before it starts rearranging new tabs. I've noticed that this sometimes isn't enough though, and tabs will occasionally be rearranged on startup. I think I can improve this by resetting the timer every time a new tab is created, so that if many tabs are created in quick succession, but creating them all takes longer than 1 second, they don't get rearranged.

I don't know if that would solve your problem though. If not, I suggest disabling ClassicTabs manually before restoring a session for now. I don't want to have ClassicTabs start up completely disabled, because that would be inconvenient for the majority of users.

I believe there is an API for allowing extensions to message each other. If so, I could allow other extensions to temporarily disable ClassicTabs. Then it would be up to SessionManager to add in the code to disable ClassicTabs before opening a session.