tabcenter-redux
tabcenter-redux copied to clipboard
Opening a new tab scrolls to the bottom, not the new tab
To reproduce
- Install Tab Center Redux.
- Install Always Right. This causes new tabs to open immediately after the current tab.
- Create enough new tabs so that your vertical tab list fills up the Firefox application window.
- Select a tab near the top of the list.
- Create a new tab.
What happens:
The new tab is created immediately after the one you were on but the tab list scrolls to the bottom as if a new tab was created at the bottom.
What should happen:
The tab list should not be scrolled to the bottom. Maybe there is some code that is scrolling to the bottom? Can it just select the newly created tab instead?
Always Right and Open Tabs Next to Current achieve the desired final tab position by moving the new tab to the position after the current tab. This means that the new tab is briefly at the end of the list, and Tab Center Redux scrolls to keep up with it. The issue is that Tab Center Redux doesn't scroll back; the native Firefox tab bar does do so, so the issue is less noticeable there than it is when using Tab Center Redux.
I don't know if there's an easy way to address this, but I hope that there is. I think that vertical tabs appeal to people who have a lot of them open, and these extensions to keep new tabs near what you're currently focused on do as well. It would be nice if they played together nicer.
Tab Center Redux scrolls to keep up with it
Oh really? Do you or anyone know where in the code that happens?
No. I'm just inferring this based on what I know about the behavior of the other extensions. Rather than just creating a new tab in place, the new tab is created in its normal position at the end of the list and then moved to its destination immediately after the previously open tab. Since after all of this, Tab Center Redux is scrolled all the way to the bottom, I'm just making an assumption that it happens at that point.
If it's happening in Tabcenter Redux then it would be easy to fix! If it's happening in the WebExtensions tab API code then it would be harder to fix.
Good news! The preference browser.tabs.insertAfterCurrent
was finally implemented.
It will open new tabs after the current tab without the scrolling issue described above. :)
The new API will be used in Always Right: see https://github.com/autonome/Always-Right/issues/22
So, this will now be fixed for Firefox 61 and later.