stoically / temporary-containers

Firefox Add-on that lets you open automatically managed disposable containers
https://addons.mozilla.org/firefox/addon/temporary-containers/
MIT License
848 stars 57 forks source link

Tabs opening twice? #483

Open superuser-does opened 3 years ago

superuser-does commented 3 years ago

This is a support ticket for temporary containers in automatic mode.

I have used Inoreader for some years. I'm not sure why but article links on it always open twice. By this I mean it's tmp1 and tmp2 for example, they are two separate tabs even though there was one click. Here's a screenshot (I use Sidebery which is why the tabs looks like this): image

The article links have target=_blank and rel=noopener. I can confirm also that Inoreader links are direct, there's no inbetween link. So the link-opening behaviour (e.g. if domain is the same) doesn't matter for this issue. I have InoReader in a permanent container designated to that site (and a few more) only.

Some other extensions I have that may affect it, though unlikely:

The left-click action is to open in the Entertainment container which is what I call the container Inoreader is in. However, as Entertainment is limited to sites like InoReader they will open in a new container. If I open in No Container, it opens normally but this requires a right click.

This is the only site so far I have had this issue on, where tabs always open twice. Thank you for any support on this matter.

superuser-does commented 3 years ago

Okay, I guess I fixed my own issue: I had to disable 'limit to designated sites' in the Multi-Account Containers extension.

I will leave this issue open in case you consider this something you wish to work on, otherwise feel free to close.

dhasial commented 3 years ago

I figured I'd chime in and say I've been having the same issue for about 2 and a half weeks. Still haven't figured out what is causing it and superuser-does's solution doesn't seem to work for me at all.

silverwings15 commented 3 years ago

@Dhamma-valence try this image

dhasial commented 3 years ago

Damn, it doesn't work still even with those settings off.

I do also use the Multi-account Containers addon with this, and the Temporary Containers integration with it but that doesn't seem to have an effect.

silverwings15 commented 3 years ago

@Dhamma-valence the issue happens when the new tab is opened in a different container than the parent tab, right?

dhasial commented 3 years ago

Yes, I believe so. Most often when I'm going from my search engine / search engine container to a result / temporary container.

I should note that I'm also using Tree Style Tabs which can modify new tab behaviour, but I'm not sure that that is part of this since it mostly just controls where in the tree the new tabs are place, and not the number of new tabs. (But who knows)

stoically commented 3 years ago

Since this seems to not be easily reproducible, I'd need a debug log to look into that

konomikitten commented 3 years ago

I have an easy way to produce this issue, with Automatic mode on do the following:

  1. Go to https://duckduckgo.com/
  2. Type into the search box !g test
  3. Two tabs are produced when DuckDuckGo redirects you to Google Search.
stoically commented 3 years ago

Thanks. That seems DuckDuckGo-specific (and different from OPs issue), because they redirect on click to a page that contains

function ffredirect(){window.location.replace('https://google.com/search?hl=en&q=foo');}setTimeout('ffredirect()',100);

Hence TC sees two requests to google and isolates both. That would need some special-casing for DDG preventing one of the two requests - nothing TC can handle natively, I think.

konomikitten commented 3 years ago

Hence TC sees two requests to google and isolates both. That would need some special-casing for DDG preventing one of the two requests - nothing TC can handle natively, I think.

The behaviour doesn't happen with TC disabled, I'm not sure of the technical details but considering the behaviour is only observed with TC enabled that seems like a TC bug to me?

Edit: In fact with TC disable DDG actually opens the Google redirect in the same tab, obviously that would be impossible for TC but it certainly seems like it shouldn't be creating two new tabs.

crssi commented 3 years ago

That is because it gets opened everytime (that is twice) in the different container.

I guess this is the same that can/could be resolved by https://github.com/stoically/temporary-containers/issues/397

Or having an option to always group the base domains containers... so if you click a link where target is a domain.com and there is already some tab opened in a domain.com container, then this new one should also be opened in the same container,

svensven commented 3 years ago

Okay, I guess I fixed my own issue: I had to disable 'limit to designated sites' in the Multi-Account Containers extension.

This seems to be the issue I was having too. I had DDG in its own container, with "Limit to Designated Sites" ticked in Multi-Account Containers. Clicking or middle clicking a search result opened 2 tabs. Unticking "Limit to..." seems to have fixed that.

MrQwerky commented 2 years ago

Using Multi-Account Containers in conjunction with Temporary Containers, I also confirm this issue. Disabling all isolation, as suggested in one comment, did not solve it. Only turning off 'Limit to Designated Sites' in M-AC resolved it. However, the issue is not there without Temporary Containers, so Temporary Containers seems to be at least partly responsible. Perhaps a conflict?

eternal-sorrow commented 5 months ago

Any updates? Issue still present.

escapewindow commented 4 months ago

I was getting this, found this issue, and then resolved my own issue.

I had:

I removed the isolation -> per domain sites and no longer get the duplicate tabs.

eternal-sorrow commented 4 months ago

I have neither isolation per domain nor 'limit to designated sites' enabled, but I get 2 tabs of reddit open every time I open it from the search. No other site has this problem.

eternal-sorrow commented 4 months ago

This is somehow linked to the fact that I have another extension that redirects any reddit URL to old.reddit.com. I disabled this redirect and the problem stopped.