gecko-dev/dom/base/test/file_bug1691214.html
Emilio Cobos Álvarez d871818995 Bug 1691214 - Take focus from window.open etc even if we're already active but not in the active window. r=hsivonen
With multiple windows, a browsing context being active doesn't guarantee
being in the active window, so we explicitly check for that. We need to
introduce an special case for the initial document because the initial
document in the active window requesting focus breaks focusing the
urlbar on a new window.

Differential Revision: https://phabricator.services.mozilla.com/D104326
2021-02-09 13:03:32 +00:00

5 lines
279 B
HTML

<!doctype html>
<a id="link-1" href="?1" onclick="window.open(this.href, 'childWin', 'height=300,width=600'); return false;">Open in window.</a>
<br>
<a id="link-2" href="?2" onclick="window.open(this.href, 'childWin', 'height=300,width=600'); return false;">Open in window.</a>