Closed Bug 645341 Opened 13 years ago Closed 13 years ago

opener.focus() is not working, parent window/tab is not focused

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: glibnes, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 FirePHP/0.5
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0

When you open a new window with window.open() and later you want to come back to parent window with opener.focus() (or window.opener.focus()), it's not working at all...

Reproducible: Always

Steps to Reproduce:
1. Create JS Script, which will open a new window with window.open()
2. Go to new Window and create button/link/whatever with onclick="opener.focus()"
3. Parent window won't be focused


Expected Results:  
Parent window should be focused
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Firefox disables pages from being able to raise/lower other windows, in general, so window.focus is disabled unless being called on a window by the opener of that window.

This is a preference you can change in your JavaScript preferences if you prefer the other behavior.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Oh, and Ms2ger: the default DOM behavior is to allow the focus() call, but Firefox sets the preference to a non-default value.
Well, moving it to a component where you'd see it seems to have worked :)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.