window.open(url,windowname,opts)在新标签中打开,而不是在Firefox中的新窗口 [英] window.open(url, windowname, opts) opens in new tab instead of new window in Firefox
问题描述
window.open('http://www.google.com/',window_name,'width = 400,height = 320');
完全停止在Firefox中打开新窗口,无论你放置为window_name(_blank,无论..)!这一定是最近(一年前)的工作,但现在它停止工作了!在过去,Firefox必定会有一些相当新的变化,也就是答案这个问题证明这一点 - 他们以前工作,但不再工作!
我的怀疑是,它停止工作,因为选项在新选项卡中打开新窗口
(工具/选项/选项卡)默认为true!它必须是一个最近的变化。
我的用例真的需要打开一个简单的小传奇窗口 - 打开新标签这是矫枉过正。
问题是这是一个默认的,普通用户不知道这个设置 - 他们只是看到网站的行为是奇怪的!
有没有什么办法可以覆盖Firefox的行为?
你的小提琴不包含代码你发布。这个工作正常: http://jsfiddle.net/HLbLu/
请注意,由于某种原因,调用 window.open(...)
与调用 open()不同。 。)
。
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?
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(...)
.
这篇关于window.open(url,windowname,opts)在新标签中打开,而不是在Firefox中的新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!