Closed Bug 336518 Opened 18 years ago Closed 18 years ago

DOM event onfocus goes into infinite loop

Categories

(Core :: DOM: Events, defect)

1.8 Branch
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 58441

People

(Reporter: invisible, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/, o

When I set onfocus event on a textbox, or text input (possibly any form element), it raises onfocus element all the time, thus going into infinite loop.

If you put test alert box on the onfocus element you will not be able to quit firefox.

NOTE: Depending on the speed of computer if you hold keyboard shortcut for new tab or to quit firefox you'll manage sometimes to get out of this "DOS". So try holding CMD+T or CTRL+T to create new tab and then clicking OK buttons on alert boxes. In about 20 tries you'll be able to free yourself. As soon as you return to the tab with the textarea bug, you'll have to redo this to get out of the alert loop.

It is repeatable on Max OS X Firefox 1.5.0.3, on Linux Firefox 1.0.8, and on latest nightly build on Mac OS X, firefox-3.0a1.en-US.mac

Reproducible: Always

Steps to Reproduce:
1. Load the above url (http://www.hidden-city.net/temp/focus_test.html)
2. Click on first textarea element or first text input element

Actual Results:  
You get a popup message loop you cannot exit

Expected Results:  
Receive popup only once and then clear the onfocus event.

All other browsers I've tested including IE, Safari, and Opera behave normally
DoS bugs (especially bugs that involve JavaScript) aren't considered security holes.  I think it's a bug that focus() keeps getting called in this situation, so I'm not marking this as a dup of bug 61098.
Assignee: nobody → events
Group: security
Severity: normal → critical
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch

*** This bug has been marked as a duplicate of 58441 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.