搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

javascript window.focus error

  • 2 个回答
  • 3 人有此问题
  • 13 次查看
  • 最后回复者为 Col_Boogie

more options

Created window with window.open If I remove window from top, window.focus() does not work. Expecting new window to come back on top. See http://www.americasfreedompressalliance.us/VNotes2.html as example, all HTML code included Works properly with IE

Created window with window.open If I remove window from top, window.focus() does not work. Expecting new window to come back on top. See http://www.americasfreedompressalliance.us/VNotes2.html as example, all HTML code included Works properly with IE

被采纳的解决方案

Firefox has a setting that governs whether scripts can change the window z-order. By default, scripts are supposed to be disabled from doing that. You can test whether that is the issue:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste dom.d and pause while the list is filtered

(3) Double-click the dom.disable_window_flip preference to switch the value from true to false

Does that make any difference?

定位到答案原位置 👍 3

所有回复 (2)

more options

选择的解决方案

Firefox has a setting that governs whether scripts can change the window z-order. By default, scripts are supposed to be disabled from doing that. You can test whether that is the issue:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste dom.d and pause while the list is filtered

(3) Double-click the dom.disable_window_flip preference to switch the value from true to false

Does that make any difference?