window.focus will not re-focus pop-up window once focus has been moved away. (Firefox 2.x for Windows)




12 years ago
12 years ago


(Reporter: mark, Unassigned)


Firefox Tracking Flags

(Not tracked)





12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070309 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070309 Firefox/

When a page opens a pop-up window (with, the window will gain focus as expected.  If the user clicks away from the pop-up, then clicks again on the link that opens the pop-up, the pop-up will not regain focus -- even if it calls "window.focus()" with its onload event _and_ even if page is reloaded from scratch via a script.  

Note: This works as it should in the OS X version.

Reproducible: Always

Steps to Reproduce:
1. Please see example URL
Actual Results:  
Pop up does not regain focus

Expected Results:  
Pop-up should move in front of opener window.
This works for me when I put a check in the box "Raise or lower windows" in the Advanced JavaScript settings (Tools -> Options -> Content).
Please resolve this bug as INVALID (= not a bug in Firefox) if this also works for you.

This is default DOM-security behavior, undoubtedly put there to stop annoyances from various web advertisers - unfortunately, you happen to be legitimately using the same DOM features used for popup and popunder advertisements, but as noted in #1, the setting to allow "Raise or lower windows" controls this.

Closing as invalid because this is not a bug in Firefox, but a designed behavior.
Last Resolved: 12 years ago
Resolution: --- → INVALID

Comment 3

12 years ago
Hmmm.  Okay so "It's a feature not a bug" then.  It would seem that designating a site as an "Exception" to the pop-up blocker would also confer the permission to raise and lower its windows.  By changing this option universally, you permit not only the legitimate application's pop-ups to use it but also the ad's pop-ups.  Less than ideal.  
You need to log in before you can comment on or make changes to this bug.