Thanks!
Not all events bubble - events that don't bubble need special handling
in order to be able to delegate them like Entwine does (and like
jquery live does). Most of the techniques I use to do this handling
come from the jquery plugin http://plugins.jquery.com/project/Live-Extension,
which is where focusin and focusout originally come from.
The root cause of the naming is that for IE we use the browser-
specific events focusin and focusout, and in other browsers we use
blur and focus in capture mode.
I actually prefer focusin and focusout (they pair with mousein and
mouseout), and the semantics of the event are slightly different to
focus and blur - you can bind focusin and focusout to any element, not
just input elements, and they trigger whenever any child gains or
loses focus.
I've been thinking of adding focusenter and focusleave to pair with
mouseenter and mouseleave, and a bunch of other custom events,
probably as a plugin. If there's strong enough demand I'll make that
plugin alias focus and blur to focusin and focusout.
Hamish Friedlander
Thanks!
On Jan 19, 12:31 pm, hamish <ham...@silverstripe.com> wrote:
> Hi,
>
> Not all events bubble - events that don't bubble need special handling
> in order to be able to delegate them like Entwine does (and like
> jquery live does). Most of the techniques I use to do this handling
> come from the jquery pluginhttp://plugins.jquery.com/project/Live-Extension,