You must Focas. Sorry, couldn't resist.
:P
Thanks for the heads-up.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Focas,
GrantSent: Monday, 7 November 2005 12:12 PMTo:
wsg@webstandardsgroup.orgSubject: [WSG] Firefox onblur and onfocus
event bubbling bug
Hi
standardistas,
I’ve had a problem with onfocus and
onblur where Firefox is calling onblur before onfocus when clicking on an input
element.
This is a bug (https://bugzilla.mozilla.org/show_bug.cgi?id=53118
) because it goes against the DOM2 Event handling
spec.
The only way around it at the moment
seems to be to “check whether you’re running on Gecko via client sniffing and
insert a conditional code fork in your _javascript_ so […] you explicitly
preventBubbles on the event that really shoulnd’t bubble in the first place.”
(from the page referred to above).
Just thought I’d let those of you
unaware of this issue know so you don’t have to suffer the same frustration I’ve
had trying to figure out what’s happened. Anyone with Firefox 1.5 beta know if
this issue is fixed in that version?
Here’s my
test:
HTML:
onblur
test
IE6
using a mouse to click into the
textbox alerts ‘onfocus called’
using a mouse to click outside the
textbox alerts ‘onblur called’
keyboard tabbing to the textbox
alerts ‘onfocus called’
keyboard tabbing out of the textbox
alerts ‘onblur called’, followed by ‘onkeydown called’ followed by ‘onfocus
called’ followed by ‘onblur’
Firefox
1.07
using a mouse to click into the
textbox alerts ‘onblur called’ followed by ‘onfocus
called’
using a mouse to click outside the
textbox alerts ‘onblur called’
keyboard tabbing to the textbox
alerts ‘onblur called’ followed by ‘onfocus called’
keyboard tabbing out of the textbox
alerts ‘onblur called’, followed by ‘onkeydown called’
Grant Focas**This message is intended for the addressee named and may containprivileged information or confidential information or both. If youare not the intended recipient please delete it and notify the sender.**