206 bytes, text/html
702 bytes, text/html
3.08 KB, text/plain
801 bytes, text/html
1.06 KB, text/html
<BODY onBlur=window.close()> The first Blur event gets lost and nothing happens. The window closes on the second Blur. Netscape 4 closes on the first.
The above relates to Mozilla 2000031013
The second attachment i.e. the test that works, applies the onBlur=close() in windows that were opened dyamically, thus it is closer to a real life use of onBlur=close(). Just why the test in the first attachment fails is a mystery to me.
email@example.com - are you still seeing this problem on recent builds of Mozilla? Gerv
I tried running the 2 attachments again this time with 2000041309 id=6410 is as before, the window closes on the second blur event id=6496 was working last month, it crashes 2000041309 ............. Vince
Confirming, adding crash keyword (see previous comment). Gerv
Upgrading severity, as this is a crash bug. Gerv
Changing OS to All. Crash reproduced on PC/Linux with 5/21 and 5/27 builds. Steps to reproduce: 1) load the second attachment (03/13/00 16:34) 2) click on the link to create new windows. Three little windows will appear. 3) click into one of them, and then move the mouse out of it. This will crash.
The most similar crash I could find is in bug 39889 "Crash on exit"
Just pulled and built on NT. I do not see a crash. Does Linux still crash? The blur bug is still there.
Mass update: changing qacontact to firstname.lastname@example.org
HTML 4.01 does not actually define that BODY element should have onblur/onfocus attributes. But since NS 4.x and IE do this, adding 4xp keyword.
I am starting to think the JS created windows do not get the focus/blur events when they are created. Once they are up, and if I click on one and then change to another window the blur event closes the window.
Assigning to saari
Per heikki, saari, ckritzer: This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Lads, you can't "future" a crashing bug, surely? Could you have another look at this one? Gerv
Gervase, please confirm that you do see a crash, and say the build & platform. I removed the crash keyword because it was no longer crashing. By the way, there are several crashers futured anyway... (or at least there were).
This bug has indeed gone away in today's build (2000-08-28-08). On the other hand, the bahavior that is expected (?) of onBlur in the second test case (03/10/ 00) seems to have been killed as well. Anyone have ideas here? Mac OS9 running PR2 case 1: Pr2 dies, crashes and burns. Mac OS9 running 2000-08-28-08 case 1: Closes window (with no way of opening another or quitting, may I add) as it should close window, with other side effects Mac OS9 running 4.74: Closes window. Wow.:) Mac OS9 running PR2 case 2: Windows do not close when onBlur should be called. Mac OS9 running 2000-08-28-08: Windows do not close when onBlur should be called. Mac OS9 running 4.74: Closes window when you jump to another window as it should. IOW, its working as it should. In any event, I'm no longer seeing a crash here.
Changing Platform to "All" since Mac OS 9 also seems to be affected by issues in onBlur.
18 years ago
Uh oh... Tested on Linux commercial debug build (just pulled and built), and I see crash with test case 1. Steps to reproduce:
Marking as [nsbeta3-] a number of bugs that were already marked Future (but not [nsbeta3-]) because the Netscape engineer the bug is assigned to is overburdened. If you disagree with this decision, please provide information about customer and user impact, but please do not clear the [nsbeta3-] unless you are reassigning the bug to yourself and committing to a fix within the nsbeta3 timeframe.
Doh, I see my comment didn't make it (bug in submit). It was supposed to say something like: open this bug report, open the test case into another window, click on the content area, click back into the first window -> crash.
Updating QA Contact.
Crash, but in an uncommon situation. Targeting Mozilla 0.9
changins Status for my reference. Was NSBETA3-.
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
->joki, per saari's punt
Taking back and putting in the furture list after talking with Tom. He already has a dup of the crasher part of the bug (31847), so I'm removing the crash key work and making this depend on that.
Related to bug 58419?
I believe this may be fixed. In testing 58419 (a bug on general window.close behavior) I seemed to get appropriate onblur=self.close() behavior. But saari knows more of the complex blur behavior so I'll let him decide if there is still some odd case where the blur does not fire.
I have tried both the test cases with 2001042604 under windows 95, a blur/focus issue remains. I don't want to tell anyone how to suck eggs here but running the tests was enlightening for me, I hope my observations are of use. I thought a window was either in focus or not, i.e. blurred. Mozilla demonstrates a 3rd state, highlighted but not in focus. The onBlur event is not being actioned unless the user has previously clicked in the CONTENT of the window to make sure it not only highlighted but also focussed. Regards ......... Vince
QA contact updated
*** Bug 93800 has been marked as a duplicate of this bug. ***
I have run the second test case again using Mozilla 0.9.7 20011221 It is no longer necessary to click on the CONTENT of a window for it to become sufficiently focussed for the onBlur to get actioned. This is good. It seems to behave OK even though it is not the same as Netscape or IE. They both action the onBlur=window.close()on win0 and win1 as win1 and win2 are opened. ......... Vince
I have run both test cases using Mozilla 1.2.1 20021130. The second works just fine, the same as Netscape 4 and IE. In the first test case the window does not get closed, nor does the user get prompted to ask if it should be closed.
The first attachment (attachment 6410 [details]) is simply incorrect: you can't close a window which was not opened by a script or the last opened window. The second attachment has coding difficulties and is not a reduced testcase. var win = window.open('',name,features,''); win.document.writeln('<HTML><HEAD><TITLE>' + name + '</TITLE></HEAD>' - win.document.open(); is needed in there. http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-72161170 - forward slashes / are not escaped when constructing the string I do not know if this would cause the problem in the code; I also wonder if generating the document content and the document itself do not complicate the purpose of the testcase. The 3 windows are created as part of an on-going code being executed. The onblur event is not fired because of such execution. I question the relevancy of the testcase also; the summary of the bug is much more modest. Finally, onblur is not even a valid event attribute for the body element: http://www.w3.org/TR/html401/struct/global.html#edef-BODY Testcase coming anyway
Created attachment 110355 [details] Popup child window with <body onblur="window.close();"> This is the child popup window.
Created attachment 110356 [details] Parent/opener of the popup window that has onblur="window.close();" This test case WFM perfectly. XP Pro SP1, build 2002122408. For many reasons, I believe this bug should be resolved . I even wonder if it should not be resolved as WONTFIX or as INVALID. My 2 cents.
All testcases attached to bug WFM with 2003041416/trunk/W2K Marking such.