Closed Bug 358828 Opened 18 years ago Closed 18 years ago

window.focus() will not focus child window after initial open

Categories

(Firefox :: General, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: rkruzan, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 When a new window is opened as a child, it focuses as expected. But when focus returns to the parent, for example when a link is clicked in the parent to open the same child with a new URL, the focus does NOT return to the child even when it is explicitly called. Repros on FF2 in Win XP Pro as well. Reproducible: Always Steps to Reproduce: 1. open attached file in Firefox 2 (downloaded from http://www.mozilla.com/en-US/) 2. Click on the first link, see new child window open and focus 3. Click on the second link in parent, child win does not gain focus, new URL has loaded. Actual Results: Instead of child window gaining focus from myNewWindow.focus() (see small code in attached) and loading the new URL, the child does not gain focus. Expected Results: Expected behavior as found in previous versions of Firefox and other browsers which is that the child would gain focus if told to do so. I suspect this is related to other bugs dealing with child windows. I've attached a very simple repro case, hope it helps. I classed the severity as Major because really, a major piece of functionality is broken. Many sites rely on being able to bring focus back to child windows for thousands of reasons, this functionality should not have gone away.
adding repro code.
Have you checked tools|options -> content... click advanced... next to enable javascript 'Raise or lower windows' should be checked. Now the fact that this seems to be defaulted off is in my opinion a pain... WORKSFORME though
Confirmed changing the settings worked. I second (and third through 7th from my development team) the opinion that this being OFF by default is indeed a pain.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
*** Bug 361237 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: