Closed Bug 334784 Opened 18 years ago Closed 12 years ago

When `input1.onblur` (invoked by switching away from Firefox) gives `input2.focus` Firefox messes up it's own .focus events


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

Windows XP
Not set





(Reporter: mdonatas, Unassigned)


(Depends on 1 open bug)


(Keywords: testcase)


(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060308 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060308 Firefox/

We have two input fields (others might just work too), input1 has event handler for blur attached to it. When blur event is triggered it gives focus to input2. If blur for input1 is invoked by switching away from Firefox i.e. clicking the taskbar, things mess up. Address/search bar becomes unusable (seems they refuse .focus event) just like input1 and input2 fields.

I'd rate this critical, Firefox kinda hangs.

Reproducible: Always

Steps to Reproduce:
1.Open testace
2.Click the taskbar
3.Go back to Firefox
4.Try to type into the address bar or searchbar or type something into input1

Refreshing the page does not help unless before refreshing sourcecode is modified then everything goes back to normal.

Applies to "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060418 Firefox/2.0a1" too
confirmed as described with test case.. URL bar becomes unusable, shortcuts to switch between tabs no longer work
Confirmed with 2006-04-20 trunk build.
Assignee: nobody → events
Component: General → Event Handling
Depends on: 53579
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
One of our customers also reported this bug to us. Basically we validate forms during the onBlur event and if customers switched windows and then switched back to Firefox, all keyboard focuses were broken.

This testcase is an example of validating a form. FYI, The setTimeout is to work around bug 53579.
Can you reproduce with Firefox v2.0.0.14 ?
(or Firefox v3.0pre ?)
The testcases still work in 3.0.7.
After running one of the two testcases I can't use any <input type="text" /> and <textarea> (including the urlbar and searchbar) anymore.
Assignee: events → nobody
QA Contact: ian → events
works here
Closed: 12 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.