david wrote: > Hi Rauan, > > A question, does the focus effect bubble ?? > > because this work: > $(document.body).observe('click', function(e) { > var _elem=Event.element(e); > alert(_elem.tagName); > return; > }); > > but not the same code when you use the focus event instead of the > click event works. > > -- > david > That is correct. The focus event does not bubble. (http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/).
The article mentions you should not use event delegation for focus, blur, load, unload, or mousemove. - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---