Permalink
Browse files

Touch Events: Bind swipe touchstop to document as they may swipe off …

…the target element
  • Loading branch information...
arschmitz committed May 7, 2013
1 parent 3ba4a42 commit 72654a102825296f5dca9be31bc84b6cee4a1dd6
Showing with 9 additions and 9 deletions.
  1. +9 −9 js/events/touch.js
View
@@ -70,7 +70,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
}, 50 );
});
},
- teardown: function() {git
+ teardown: function() {
$( this ).unbind( scrollEvent );
}
};
@@ -189,15 +189,15 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
}
}
- $this.bind( touchMoveEvent, moveHandler )
- .one( touchStopEvent, function() {
- $this.unbind( touchMoveEvent, moveHandler );
+ $this.bind( touchMoveEvent, moveHandler );
+ $document.one( touchStopEvent, function() {
+ $this.unbind( touchMoveEvent, moveHandler );
- if ( start && stop ) {
- $.event.special.swipe.handleSwipe( start, stop );
- }
- start = stop = undefined;
- });
+ if ( start && stop ) {
+ $.event.special.swipe.handleSwipe( start, stop );
+ }
+ start = stop = undefined;
+ });
});
},

0 comments on commit 72654a1

Please sign in to comment.