Closed Bug 1547579 Opened 6 years ago Closed 6 years ago

Clicking on link with target="blank" doesn’t close popup

Categories

(WebExtensions :: Frontend, defect)

66 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: hello, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36

Steps to reproduce:

Clicking on link with target="blank" doesn’t close popup.

Example:

<a href="https://example.com/" target="_blank">Test</a>

I’m porting a Chrome extension to Firefox and the same code on Chrome closes the popup. Expected the same behaviour on Firefox. I totally understand full compatibility isn’t expected but wanted to report this incoherent behaviour nonetheless.

Actual results:

The popup stays open even though the link is opened in a new window or tab.

Expected results:

I expected the popup to close.

Adding an onclick event with the following setTimeout works but feels like a monkey patch.

setTimeout(function() {
window.close()
}, 1);

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Version: Firefox 66 → 66 Branch
You need to log in before you can comment on or make changes to this bug.