Closed Bug 1172206 Opened 9 years ago Closed 5 years ago

New window opened via window.open should be in background when ctrl/cmd is pressed

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1081542
Tracking Status
firefox41 --- affected

People

(Reporter: xidorn, Unassigned)

Details

Currently, if we click a link with ctrl/cmd pressed, the link will be opened in a new background tab. But this behavior is broken if the page calls preventDefault() on that click, and use window.open() to open the page instead. This problem affects Gmail, which seems to use window.open() to open the links in emails. And in general, when users are pressing ctrl/cmd, they should expect that any new tab to be opened in the background. Chrome seems to solve this by opening any new tab in background if that key is pressed. We probably should follow this behavior. A simple testcase: data:text/html,<button onclick="window.open('about:blank')">hello</button>

Duplicate of Bug 1081542

Flags: needinfo?(xidorn+moz)

I think you're right.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(xidorn+moz)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.