"openerTabId" not present in tab opened as a popup (getting opener tab of popup)
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
People
(Reporter: 5i13ghzt462u, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
browser.tabs.get
about a tab that has just been opened (can be done in debugger console) from another tab.- 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
Comment 1•5 years ago
|
||
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.
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).
Comment 3•5 years ago
|
||
Like I said, "moved to or opened in a different window". Feel free to update MDN.
Description
•