Closed Bug 25790 Opened 25 years ago Closed 25 years ago

Infinite loop caused by onBlur="xxx.yyy.focus()"

Categories

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

x86
All
defect

Tracking

()

VERIFIED DUPLICATE of bug 25434

People

(Reporter: mbp, Assigned: joki)

References

()

Details

(Whiteboard: [PDT+] probable fix by 2/15)

The URL given above produces a page consisting of a form with two text input fields. Whenever the focus shifts from the first field to something else, the browser hangs. I have observed this on both Linux and Windows M13 builds. The html is very simple, so I'll include it here: <html> <head><title>Test</title></head> <body> <form name="testform"> <input type="text" size="10" maxlength="20" name="t1" onBlur="testform.t2.focus()"> <input type="text" size="10" maxlength="20" name="t2"> </form> </body> </html> The problem is that when the first field looses focus, the onBlur=... code is called. This then causes nsHTMLInputElement::Focus() to be called which then (through nsEventStateManager::SetContentState() and nsEventStateManager::SendFocusBlur()) sends a new NS_BLUR_CONTENT message to the first text field. The whole process is then repeated for a few seconds until the browser throws up. (By adding printf()s in various places I have verified that this is indeed what is happening.)
adding beta1 to keywords.
Keywords: beta1
Whiteboard: [PDT+]
Whiteboard: [PDT+] → [PDT+] probable fix by 11/15
Whiteboard: [PDT+] probable fix by 11/15 → [PDT+] probable fix by 2/15
Duping this bug on 25434 moving PDT+ and beta one over to other bug. *** This bug has been marked as a duplicate of 25434 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
verified dupe
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.