Tomas
Tomas

Reputation: 59565

window.open(url, windowname, opts) opens in new tab instead of new window in Firefox

Seems that (try at jsfiddle)

window.open('http://www.google.com/', window_name, 'width=400,height=320');

completely stops opening new window in Firefox, whatever you put as window_name (_blank, whatever..)! This must have worked recently (year ago), but now it stopped working! It must be some quite new change in Firefox in the past, also answers to this question prove this - they worked before but don't work any more!

My suspicion is that it stopped working because the option "Open new windows in new tab instead" (Tools / Options / Tabs) is now true by default! It must be a recent change.

My use case really needs to open just a small simple window with legend - opening new tab for this is overkill.

The problem is that it is a default and normal users are not aware of this setting - they just see that the website behaves strange!

Is there any way to override Firefox behaviour?

Upvotes: 3

Views: 8901

Answers (2)

user123444555621
user123444555621

Reputation: 153194

Your fiddle does not contain the code that you posted. This one just works fine: http://jsfiddle.net/HLbLu/

Note that for some reason calling window.open(...) is not the same as calling open(...).

Upvotes: 9

Related Questions