]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix swipe in clearing 1894/head
authorJB Christy <JBChristy@pacbell.net>
Thu, 14 Mar 2013 03:12:45 +0000 (20:12 -0700)
committerJB Christy <JBChristy@pacbell.net>
Thu, 14 Mar 2013 03:12:45 +0000 (20:12 -0700)
update clearing to use event with .touches property, which may be
e.originalEvent

js/foundation/foundation.clearing.js

index c8ff324991762b763dd936da49415fff1ec2de93..96ae0e2ab9498c13556c4fecb83e1783ee7a93b0 100644 (file)
 
       $(this.scope)
         .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
+          if (!e.touches) { e = e.originalEvent; }
           var data = {
                 start_page_x: e.touches[0].pageX,
                 start_page_y: e.touches[0].pageY,
           e.stopPropagation();
         })
         .on('touchmove.fndtn.clearing', '.visible-img', function(e) {
+          if (!e.touches) { e = e.originalEvent; }
           // Ignore pinch/zoom events
           if(e.touches.length > 1 || e.scale && e.scale !== 1) return;