Skip to content

Commit 125bda0

Browse files
committed
🐞 #53 fix chrome touch dragging
1 parent 37b8422 commit 125bda0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/dragger.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ Dragger.prototype.create = function( options ) {
4848

4949
Dragger.prototype.bindDrag = function( element ) {
5050
element = this.getQueryElement( element );
51-
if ( element ) {
52-
element.addEventListener( downEvent, this );
51+
if ( !element ) {
52+
return;
5353
}
54+
// disable browser gestures #53
55+
element.style.touchAction = 'none';
56+
element.addEventListener( downEvent, this );
5457
};
5558

5659
Dragger.prototype.getQueryElement = function( element ) {

0 commit comments

Comments
 (0)