title: Proper touch button behavior for MobileSafari
body: <p>MobileSafari as a rule has incorrect HTML button behavior (incorrect meaning: "not like an iOS native button"). Correct button behavior is as follows:</p>
  
  <ul>
  <li>User touches button: Button highlights</li>
  <li>User drags finger out of button: Button dims</li>
  <li>User drags finger back into button: Button highlights</li>
  <li>User drags finger out of button and releases: Button <strong>does not click</strong></li>
  </ul>
  
  <p>MobileSafari buttons highlight when you touch them, stay highlighted no matter where you move, and click no matter where you release them (unless the view scrolls, in which case the touch is always canceled, even if you re-enter the button).</p>
  
  <p>This problem applies to all clickable things such as links (when <code>-webkit-touch-callout</code> is set to <code>none</code>). I have only found one web application so far that has correct button behavior: Facebook. Looking at their code for it, it looks like they've done quite a lot of jumping-through-hoops to make it work correctly (tracking all the mouse events manually and not using buttons at all). The code is dense, uses Javelin, and I'm not yet clear on all the pieces required to make it work.</p>
  
  <p>I know I'm somewhat kidding myself (since if it were easy, everyone would do it), but I'm going to ask anyway. Is there any generally-available piece of code that handles this feature? Is there a simpler solution than reverse engineering Javelin, even if it is only applicable to WebKit? (Javelin isn't very-well suited to my lightweight needs.) My ultimate goal is correct button behavior for a <code>UIWebView</code> embedded in a native app, so hybrid JavaScript/ObjC solutions are acceptable as well (though no hybrid approaches come to mind).</p>