Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 72654a1

Browse files
committed
Touch Events: Bind swipe touchstop to document as they may swipe off the target element
1 parent 3ba4a42 commit 72654a1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

js/events/touch.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
7070
}, 50 );
7171
});
7272
},
73-
teardown: function() {git
73+
teardown: function() {
7474
$( this ).unbind( scrollEvent );
7575
}
7676
};
@@ -189,15 +189,15 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
189189
}
190190
}
191191

192-
$this.bind( touchMoveEvent, moveHandler )
193-
.one( touchStopEvent, function() {
194-
$this.unbind( touchMoveEvent, moveHandler );
192+
$this.bind( touchMoveEvent, moveHandler );
193+
$document.one( touchStopEvent, function() {
194+
$this.unbind( touchMoveEvent, moveHandler );
195195

196-
if ( start && stop ) {
197-
$.event.special.swipe.handleSwipe( start, stop );
198-
}
199-
start = stop = undefined;
200-
});
196+
if ( start && stop ) {
197+
$.event.special.swipe.handleSwipe( start, stop );
198+
}
199+
start = stop = undefined;
200+
});
201201
});
202202
},
203203

0 commit comments

Comments
 (0)