Closed Bug 1596055 Opened 3 months ago Closed 3 months ago

"openerTabId" not present in tab opened as a popup (getting opener tab of popup)

Categories

(WebExtensions :: Untriaged, defect)

70 Branch
defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: c4609174, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  1. browser.tabs.get about a tab that has just been opened (can be done in debugger console) from another tab.
  2. Check openerTabId.

Now do this for two ways:

  • when the link opens in a new tab
  • and when the link opens in a popup

You can reproduce this e.g. by clicking on the follow button here (to open in a new tab instead, do this with right-click or so) here:
https://mastodon.social/@Mastodon

Actual results:

when the link opens in a new tab: openerTabId is present
when the link opens in a popup : openerTabId is undefined

Here is the example data, for comparison (I've only removed this big crazy faviconUrl): https://gist.github.com/rugk/b8ac232c1044a24edb55d291c823f6eb

Firefox 69.0.3

Expected results:

openerTabId should always be there

originally reported at https://discourse.mozilla.org/t/openertabid-not-present-in-tab-opened-as-a-popup-getting-opener-tab-of-popup/46844?u=rugkx

openerTabId is only valid for tabs in the same window. It is reset when a tab is moved to or opened in a different window from its opener.

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Resolution: --- → WONTFIX

But it's not technically moved, it already starts in the new window. 🤔

Also, if this is the final decision this should be documented on MDN, because the page does not state that the property is only valid when the ta is opened in the same window, it just says it contains the tab "that has opened it" (no literal quote).

Like I said, "moved to or opened in a different window". Feel free to update MDN.

Done.

You need to log in before you can comment on or make changes to this bug.