temporary-containers icon indicating copy to clipboard operation
temporary-containers copied to clipboard

new tab opened from link in pinned tab is not scrolled into view

Open lemon7893 opened this issue 3 years ago • 1 comments

Temporary Containers Version:1.9.2
Firefox Version:96.0

TL;DR Unless you want tabs opening at the left side, in about config set the following: browser.tabs.insertRelatedAfterCurrent false

Actual behavior

Turn on automatic mode. Open enough tabs to enable the tab scrolling left or right, plus a few more tabs. The number of tabs depends on screen width. Pin one tab to a website with links. Scroll tab bar to the tab farthest right. On site in pinned tab, left click link. Firefox defaults to open links from pinned tabs at the left end of the tab bar. So, this new tab causes the tab bar to automatically scroll the view to the left, except in this case it will sometimes not scroll all the way to our new tab, but stops one tab before the new tab, so that for us to see our new temporary tab in the tab bar we must scroll one tab to the left manually. This seems to happen to me most times in actual use but in testing with about 24 tabs opened, it occurred 6/20 times. This causes confusion and wasted time.

Expected behavior

Expected behavior is that when links are clicked from pinned tabs, the tab view will always scroll the new tab into view in the tab bar so that we immediately know where the new tab is in the tab bar.

Steps to reproduce

1. create new firefox profile, no configuration
2. install temporary-containers
3. enable automatic mode, set isolation>global>mouse click>left mouse>different from tab domain
4. open https://en.wikipedia.org/wiki/Wikipedia and pin this tab
5. open enough tabs to enable scrolling the tab bar, plus maybe 10 extra tabs
6. scroll the tab bar to the far right side
7. left click a link on the pinned tab, such as "wikipedia on twitter" in the external links section at the bottom
8. some of the time, the tab bar will scroll to the left but stop one tab before revealing our new tab.

Notes

All along I actually wanted the option for new tabs to be opened at the right end of the tab bar for a consistent behavior of new tabs at the right. In searching for the present bug having been reported, I discovered that firefox has this option available by setting browser.tabs.insertRelatedAfterCurrent to false in about:config. This seems to not present the same problem on the right side of the tab bar.

I'm guessing this has something to do with the process of intercepting new tabs and replacing them. I could not replicate this with temporary containers unconfigured.

lemon7893 avatar Jan 29 '22 10:01 lemon7893

Given your steps to reproduce mention that it sometimes works and sometimes it doesn't, this is most likely a firefox bug where it gets confused by how TC reopens the tab. The mechanism how TC does it is always the same, and TC cant control scrolling in the tab bar view in any way as there's no API for it, afaik.

stoically avatar Jun 22 '22 18:06 stoically