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

VERIFIED DUPLICATE of bug 25434

Status

()

Core
Event Handling
P3
major
VERIFIED DUPLICATE of bug 25434
18 years ago
18 years ago

People

(Reporter: Michael Bruun Petersen, Assigned: joki (gone))

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

18 years ago
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.)

Comment 1

18 years ago
adding beta1 to keywords.
Keywords: beta1

Updated

18 years ago
Whiteboard: [PDT+]
(Assignee)

Updated

18 years ago
Whiteboard: [PDT+] → [PDT+] probable fix by 11/15
(Assignee)

Updated

18 years ago
Whiteboard: [PDT+] probable fix by 11/15 → [PDT+] probable fix by 2/15
(Assignee)

Comment 2

18 years ago
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
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE

Comment 3

18 years ago
verified dupe
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.