Closed Bug 264244 Opened 20 years ago Closed 12 years ago

Focus/Blur events not reliably fired

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugs, Unassigned)

Details

Here's how I (and other) people expect focus to work:

Imagine a XUL doc with two text fields, A and B. 

A has a focus and a blur handler. 

User clicks in A. A should get focus event. 
User clicks in B. A should get blur event. 

What actually happens is not quite so simple. Occasionally A will get a focus
event when clicked, it will usually get a focus event when focused via the
keyboard, will not get a blur event when the other is clicked, will usually get
a blur event when the other is focused using the keyboard. 

While I'm here, imagine a XUL Window with an onblur handler. Intuitively this
implies "deactivate", but that's perhaps flawed (in that case, XUL really wants
activate/deactivate events). But at any rate, when I have a blur handler on a
window and then activate another, the window being deactivated gets nothing -
despite all of its controls losing focus. When I reactivate the window, the blur
handler fires twice! Zoinks! Perhaps I am overloading focus/blur in this case
and activate/deactivate would be better. OK. Let's get events for those then ;-)
We have existing bugs on this.
Whiteboard: DUPEME
No longer blocks: 258672
Assignee: bryner → events
Assignee: events → nobody
QA Contact: ian → events
Old.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Whiteboard: DUPEME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.