title: iPhone Javascript Confirm Dialog Bug
body: <p>I have a javascript confirm dialog popping up, but when I tap 'Cancel', then after the dialog closes, tap anywhere on the screen, the dialog pops up again. It only happens the one extra time, then you can tap on the page again without the dialog popping up.</p>
  
  <p>I'm only seeing this on iPhone/iPad running iOS 5.0.1. I don't have an iOS 6 device, so I'm not sure it's happening there.</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>$(bpm.remoteAppDivName).on('tap', 'a.delete-pending-payment', function(event) { 
  
      if  (isJQMGhostClick(event)) { return false; }
  
      var deleteGlobalPaymentURL = $(this).attr('href');
  
      var confirmMsg = confirm ("Are you sure you want to do that?"); 
  
      if (confirmMsg === true){
  
          window.location = '/index.htm';
  
      }
      event.preventDefault();
      return false;
  
  });
  
  var lastclickpoint, curclickpoint;
  var isJQMGhostClick = function(event){
      curclickpoint = event.clientX+'x'+event.clientY;
      var ret=false; 
      if (lastclickpoint === curclickpoint) {
          ret=true;
      } else {
          ret=false;
      }
      lastclickpoint = curclickpoint;
      return ret;
  }
  </code></pre>
  
  <p>Here's a link to the problem page: <a href="http://www.5280skateparks.com/dev/confirmBug.htm" rel="nofollow">http://www.5280skateparks.com/dev/confirmBug.htm</a></p>
  
  <p>Any help would be extremely appreciated.</p>
  
  <p><strong>UPDATE:</strong> I just confirmed that it's happening on iOS 6.0.1 as well.</p>