stoically / temporary-containers

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

Wrongly inherited `openerTabId` from the origina tab #593

Open piroor opened 2 years ago

piroor commented 2 years ago

Actual behavior

The opened tab with temporary container has its opener's opener tab's id as the openerTabId.

Expected behavior

The opened tab with temporary container has its opener tab's id as the openerTabId.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install Tree Style Tab (and leave with default settings).
  3. Install Firefox Multi-Account Containers
  4. Click the toolbar icon of the Firefox Multi-Account Containers and create a new container named as Hacker News.
  5. Install Containerise
  6. Add "news.ycombinator.com" to the rules for the Hacker News container. Click the toolbar icon of the Containerise, choose Hacker News, click the "+" button, input news.ycombinator.com to the text field, and click the save button (floppy disk icon).
  7. Install Temporary Containers
  8. Go to Temporary Containers' options: "Isolation" => "Mouse Click" => "Left Mouse" => choose "Different from Tab Domain & Subdomains".
  9. Open new tab with the URL https://news.ycombinator.com/. You should get a tree like:

    • tab A: https://news.ycombinator.com/ (container=Hacker News) (active)

      1. Ctrl/Cmd-click (or middle-click) on the "new" in the top orange bar as a child tab. You should get a tree like:
        • tab A: https://news.ycombinator.com/ (container=Hacker News) (active)
        • tab B: https://news.ycombinator.com/newest (container=Hacker News)
      2. Click the tab tab B opened at the step 10 to activate it. You should get a tree like:
        • tab A: https://news.ycombinator.com/ (container=Hacker News)
        • tab B:https://news.ycombinator.com/newest (container=Hacker News) (active)
      3. Left-click the link next to of any item (it is a link to foreign website.) It should open in new temporary container. The expected result:
        • tab A: https://news.ycombinator.com/ (container=Hacker News)
        • tab B: https://news.ycombinator.com/newest (container=Hacker News)
        • tab C: a tab with commented URL (container=temporary) (active) (

      but actually you'll see:

      • tab A: https://news.ycombinator.com/ (container=Hacker News)
      • tab B: https://news.ycombinator.com/newest (container=Hacker News)
      • tab C: a tab with commented URL (container=temporary) (active)

      The tab C should have the ID of the tab B as its openerTabId, but actually tab C is opened with openerTabId=(tab A's ID) by Temporary Containers.

Notes

The original report is https://github.com/piroor/treestyletab/issues/2998 , an issue of Tree Style Tab. I'm the author of the Tree Style Tab addon and investigated that the wrong openerTabId is given by Temporary Containers.