Closed Bug 66487 Opened 24 years ago Closed 24 years ago

Swapping focus between windows fails after about three rounds.

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 71266
Future

People

(Reporter: daniel.c.maddy, Assigned: danm.moz)

Details

(Keywords: testcase)

Attachments

(2 files)

This was found in M18 on Linux. Steps to reproduce: 1.) Write some JavaScript to open two or more non-modal dialogs by calling window.openDialog and save the return values. For example: firstWindow = window.openDialog( ... ); secondWindow = window.openDialog( ... ); 2.) Swap focus by calling firstWindow.focus(); followed by secondWindow.focus();. 3.) Repeat step 2 three or for times. 4.) *Window.focus(); should now have no effect on the actual state of the screen. Expected result: We should be able to change a window's focus in JavaScript as many times as we wish.
Browser, not engine. Reassigning to Browser-General for further triage - Dan, do you have a reduced HTML testcase you could attach to this bug? That will save us some time. See the link "Create a new attachement" above -
Assignee: rogerl → asa
Component: Javascript Engine → Browser-General
QA Contact: pschwartau → doronr
This was found while writing a XUL based application. It is really quite simple to do just spawn two windows with openDialog and try to toggle between them using the windows focus method. It does not effect 0.7 on WinNT. Here is an attempt at an on the fly example: Registred package main.xul: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <!DOCTYPE window> <window id="Main" title="Main example" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="Main();" orient="vertical" > <script language="JavaScript" src="chrome://main/content/main.js"/> <hbox class="main-hbox"> <button id="main1" value="main1" onclick="main1();"/> <button id="main2" value="main2" onclick="main2();"/> </hbox> </window> main.js: function Main() { var i; var o; w1 = window.openDialog( "chrome://main1/content", "main1", "", i, o ); w2 = window.openDialog( "chrome://main2/content", "main2", "", i, o ); } function main1() { w1.focus(); } function main2() { w2.focus(); }
Reporter this WORKSFORME just fine on the latest nightlies. Please download one of the latest nightlies at http://www.mozillazine.org/build_comments/, create a new profile and try again. My bet is this will fix it.
Attached file window.xul
Attached file main.js
Adding testcase keyword.
Keywords: testcase
XUL or DOM? Trying XUL as first guess. Adding saari and danm, focus and dialogs masters.
Assignee: asa → trudelle
Component: Browser-General → XP Toolkit/Widgets: XUL
QA Contact: doronr → jrgm
->danm
Assignee: trudelle → danm
->future
Target Milestone: --- → Future
Has anyone been able to reproduce this? If not I am going to mark it WORKSFORME.
I think this is bug 71266, which was fixed (although the fix may have caused other issues). *** This bug has been marked as a duplicate of 71266 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified dup.
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: