I ran into something interesting when reading the svg spec and ended up doing some testing. I ran into the "onactivate" event. "activate" is essentially the way <a> tags work. In other words the event fires on a onclick and also when onkeypress is fired for the enter key on an element.

Looking a bit up on Wikipedia's list of dom events there are 3 variants listed: activate DOMActivate and command.

Command isn't supported by any browser that I know of. However Firefox, Konqueror, and Safari all support DOMActivate, and IE7 supports "activate".
Opera does not appear to support any of them.

So it appears to be supported natively by gecko, webkit, khtml, and trident. So 4/5 of the major engines, presto being the last. And it can be emulated mostly in other browsers by binding a click and onkeypress event and testing for the Enter key in the keypress event.


I think the activate event would be a good thing to support in the next version of jQuery with a bit of cross-compatibility in jQuery.event and a $().activate helper. It's something few bother to do in every app they develop, and as a result when overriding links in webapps and doing event delegated things most developers just stick with onclick events and don't bother to replicate the actual range of interactivity with links which is click, enter, and accesskey.

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to