Closed Bug 380145 Opened 17 years ago Closed 17 years ago

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

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mark, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

When a page opens a pop-up window (with window.open), 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
2.
3.
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.
-> INVALID

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.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
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.