搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

On websites which open pop-under windows, Firefox 4 seems to be opening these over the current window instead of under. Is this a bug or an intentional feature?

  • 6 回覆
  • 254 有這個問題
  • 3 次檢視
  • 最近回覆由 marques99

more options

I have noticed a problem on FF4 when browsing sites that open pop-under windows on a user action. With all other browsers (including FF3) these open underneath the main window, but on Firefox 4 they open over the top - acting as pop-ups and not pop-unders.

While pop-unders are annoying, it is even more annoying to have them keep appearing as pop-ups instead.

I have run some tests and the following code successfully opens a pop-under on all browsers except Firefox 4.

It appears that window.focus() is not correctly bringing the current window to the top.

Example code:

   var w = window.open('http://www.mydomain.com/', 'mywin', 'width=400,height=300,toolbar=1,menubar=1,resizable=1,scrollbars=1');
   if(w){
       w.blur();
       window.focus();
   }
I have noticed a problem on FF4 when browsing sites that open pop-under windows on a user action. With all other browsers (including FF3) these open underneath the main window, but on Firefox 4 they open over the top - acting as pop-ups and not pop-unders. While pop-unders are annoying, it is even more annoying to have them keep appearing as pop-ups instead. I have run some tests and the following code successfully opens a pop-under on all browsers except Firefox 4. It appears that window.focus() is not correctly bringing the current window to the top. Example code: var w = window.open('http://www.mydomain.com/', 'mywin', 'width=400,height=300,toolbar=1,menubar=1,resizable=1,scrollbars=1'); if(w){ w.blur(); window.focus(); }

所有回覆 (6)

more options

This is normal. Firefox 4 has disabled the default "window flip". - go to adress about:config - accept and search dom.disable_window_flip set to false; And popunder, blur/focus javascript function will be back ;)

由 MrPing 於 修改

more options

FF3 has the same dom.disable_window_flip set to true, and the example above is not an issue. Using window.focus and window.blur work, and pop-unders pop 'under' not 'over' as they do in FF4.

more options

hum.. when i set dom.disable_window_flip to false in FF4 pop-unders it's ok. Yes, the parameter is to true in FF3 and pop-unders ok. Strange...

more options

there are multiple ways of having pop under working in firefox 4 :-) $1000 and it works - [email protected]

由 c0der 於 修改

more options

Is this just a browser configuration? How do you override this via JavaScript and override the browser config?

more options

So the developers of firefox thought it would be a good idea to force pop unders to pop up? Do they think websites are going to stop using them? If I had to choose I rather have a pop under then a pop up. Chrome, IE and Safari handle pop unders the same why does firefox have to be difficult.