Closed
Bug 1878318
Opened 2 years ago
Closed 2 years ago
window.open doesn't respect background tab preference
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1081542
People
(Reporter: firefox, Unassigned)
Details
Attachments
(1 file)
|
494 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15
Steps to reproduce:
- In Firefox General preferences, uncheck "When you open a link, image or media in a new tab, switch to it immediately"
- Open the attached sample HTML file "index.html"
- Command-click on the "window.open" link
Actual results:
The link opens in the foreground.
Expected results:
The link opens in the background.
The example works as expected in Chrome and Safari.
Below is the relevant HTML/JavaScript:
<p><a href="https://example.org" id="example">window.open</a></p>
<script>
document.getElementById("example").addEventListener("click", (event) => {
event.preventDefault();
const newWindow = window.open("", "_blank");
if (newWindow)
newWindow.location = "https://example.org";
});
</script>
Updated•2 years ago
|
Component: Untriaged → Tabbed Browser
Updated•2 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1081542
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•