web-archives icon indicating copy to clipboard operation
web-archives copied to clipboard

Properly set `openerTabId` on new tabs

Open jaens opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

When new tabs are opened by the extension, they are not linked to the originating tab due to not having the openerTabId property passed to browser.tabs.create().

This somewhat confuses tab management extensions such as Tree Style Tab causing them to possibly insert the tab into suboptimal positions.

Describe the solution you'd like

When opening new tabs, the openerTabId should preferably be set to the originating tab ID, retrieved from eg. (await browser.tabs.query({active: true, currentWindow: true}))[0]?.id.

Additional context

I'm willing to work on a pull request if this sounds fine. Hints where to modify the code are appreciated.

jaens avatar May 22 '22 15:05 jaens