RE: focus/blur events

Ian,
 
> On Wed, 29 Mar 2006, Mark Birbeck wrote:
> > 
> > On the one hand, the DOMFocusIn and Out events are in the 
> DOM 2 Events 
> > spec, and have been for nearly six years.
> 
> Have they? Look at the spec.

What an odd thing to say...do you think I haven't?


> This is the sum total of the spec for DOMFocusIn:
> 
> | DOMFocusIn
> |     The DOMFocusIn event occurs when an EventTarget 
> receives focus, for 
> |     instance via a pointing device being moved onto an 
> element or by 
> |     tabbing navigation to the element. Unlike the HTML event focus, 
> |     DOMFocusIn can be applied to any focusable EventTarget, 
> not just 
> |     FORM controls.
> |
> |        * Bubbles: Yes
> |        * Cancelable: No
> |        * Context Info: None
> 
> What does it normatively define? Nothing other than the name, 
> and it doesn't even require support for that. It doesn't 
> require any UA to fire the event. This definition is 
> effectively worthless.

Not at all. I agree it may not be the right place to put them, but I think
it strikes the right level, since the *exact* behaviour will have to be
different in different contexts.

What this says to me is that *if* you are producing some specification in
which some item receives 'focus' then you should use the DOMFocusIn event to
indicate that the item has received focus. Now, what exactly 'focus' means
in different contexts can't be mandated; it's vague because it can apply to
many things both now and in the future. But it's sufficiently specific to
indicate that whether you are defining a voice control or an orange circle,
you should be thinking of using DOMFocusIn. (It's more like a 'pattern'.)


> So what does it mean for DOMFocusIn to be "in" the DOM2 Events spec?

Well...kind of...well, that it's 'in' the spec. If it wasn't in the spec,
then I think we'd conclude that it's not "in" the spec, but since it is in,
it seems to me that it's safe to say that it's "in".

At least in the spec that I read.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
b: http://internet-apps.blogspot.com/
w: http://www.formsPlayer.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Thursday, 30 March 2006 10:06:16 UTC