iPad and onMouseOver

I’ve been putting the iPad simulator through its paces and I’ve run across one interesting feature in the new MobileSafari: onmouseover!

Many people, myself included1, assumed that onmouseover was dead2 with the arrival of touch based web browsers, and up until iPhone OS 3.2 that seemed to be the case. However, in my testing, I’ve found that the first tap on an element with an onmouseover “attribute” will trigger the onmouseover event, stop the click event from propagating to any children until a second tap after the onmouseover has fired.

Setting focus elsewhere (via tapping other onmouseover watching elements or form fields) will trigger the onmouseout event and, again, tapping on the element a second time while the onmouseover is active sends the click down to its child elements. You can see this in action with Twitter’s “hovercards”.

Sadly, adding those behaviors using jQuery doesn’t seem to give it the same magic. Perhaps we’ll see it in the next version of MobileSafari, and hopefully on iPhone as well. These are preliminary findings, of course, and in order to do more testing I’ll require an iPad (with 3G, please).


  1. I even went so far as to start replacing my onmouseovers with click events on lib.rario.us but I couldn’t go through with it. 

  2. By “dead”, I mean “functionally useless.”