Closed Bug 232368 Opened 21 years ago Closed 21 years ago

[FIX] Hang when tab into input element with onBlur handler

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
All
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: loconet, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: hang, regression, testcase)

Attachments

(3 files, 1 obsolete file)

User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 Using "Spiffy DHTML Popup Calendar" from : http://www.geocities.com/bazillyo/spiffy/calendar/ I've created a page which best demostrates this issue: http://scott.telnetd.com/loco/moz/calbug.php When the focus is changed to the calendar control displayed on the page, the browser stops responding. I'm not sure if it's bug in the dhtml itself more than the browser. Reproducible: Always Steps to Reproduce: 1. place cursor on the sample text box 2. hit tab 3. Actual Results: Browser stops responding. The process needs to be killed in order to terminate Expected Results: Good question, as I stated above, I'm not sure if it's a bug with the DHML itself (infinite loop? ). Going by the results from other browsers, It should set focus on the control without the user being able to edit it.
Confirmed in: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040127 Unaffected: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 This sounds like bug 232348, however I could not reproduce the problem in that URL.
Attached file testcase
testcase. Just load and hit tab. linux trunk 2004012708 hangs.
(In reply to comment #2) > Created an attachment (id=140029) > testcase > > testcase. Just load and hit tab. > linux trunk 2004012708 hangs. Ah! thanks, That's a lot cleaner. Confirming testcase crash in: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
confirmed with linux trunk 2004012708 this regressed between linux trunk 2003110605 and 2003110705, indicating bug 118685, which just landed on 1.4 branch... ==> Mats/Event Handling
Assignee: general → mats.palmgren
Status: UNCONFIRMED → NEW
Component: Browser-General → Event Handling
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: general → ian
Summary: Crash when focus on a disabled control handled by dhtml → Hang when tab into input element with onBlur handler
Attached file stacktrace
*** Bug 232348 has been marked as a duplicate of this bug. ***
*** Bug 229302 has been marked as a duplicate of this bug. ***
I can confirm the bug both with the testcase as well as with original URL using the following Mozillas: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040120 Firebird/0.7+ (also in Windows 98SE) Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-AT; rv:1.6) Gecko/20040113 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.6) Gecko/20040127 Firebird/0.7+ (MMx2000) So I guess it's not PC specific. Neither is it "trunk", using FIREBIRD_0_8_BRANCH here.
Attached file Test case (obsolete) —
I can confirm the current testcase on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031217 Firebird/0.7+. However, I don't believe the subject of this bug is correct. I've attached a testcase with an onblur handler to a text box and it doesn't trigger the bug. However, the testcase also gives a text box with an onfocus handler that does effectively hang the browser. The actual behaviour is slightly different, but I believe is the same issue. This test case causes no problems on Firebird 0.7.
Comment on attachment 140060 [details] Test case alert() totally changes the landscape. for instance, the second textbox with onfocus="alert('bob')" hangs Mozilla builds from before this bug regressed
Attachment #140060 - Attachment is obsolete: true
dup of Bug 230813.
*** Bug 230813 has been marked as a duplicate of this bug. ***
I'm looking into this...
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.7alpha
*** Bug 233413 has been marked as a duplicate of this bug. ***
This is indeed a regression from bug 118685, the lines that trigger the problem (from bug 147927) got checked in during the review so I missed it. The problem is an infinite loop of calls to ShiftFocusInternal().
Attached patch Patch rev. 1Splinter Review
This fixes the URL + testcase and all duplicates. I have also verified that it doesn't break bug 118685 and bug 147927.
Attachment #140908 - Flags: review?(bzbarsky)
Summary: Hang when tab into input element with onBlur handler → [FIX] Hang when tab into input element with onBlur handler
Comment on attachment 140908 [details] [diff] [review] Patch rev. 1 r=bzbarsky
Attachment #140908 - Flags: superreview?(bryner)
Attachment #140908 - Flags: review?(bzbarsky)
Attachment #140908 - Flags: review+
*** Bug 233551 has been marked as a duplicate of this bug. ***
*** Bug 233566 has been marked as a duplicate of this bug. ***
Attachment #140908 - Flags: superreview?(bryner) → superreview+
Patch checked in to 1.7a.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 233864 has been marked as a duplicate of this bug. ***
isn't this also needed for 1.4.2? bug 118685 made it into 1.4.2. however, there have been no 1.4 branch nightlies since Oct (except for OS/2), so I can't actually test it (without building from 1.4 CVS).
*** Bug 235111 has been marked as a duplicate of this bug. ***
*** Bug 236265 has been marked as a duplicate of this bug. ***
*** Bug 236437 has been marked as a duplicate of this bug. ***
*** Bug 236931 has been marked as a duplicate of this bug. ***
*** Bug 245827 has been marked as a duplicate of this bug. ***
*** Bug 245834 has been marked as a duplicate of this bug. ***
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: