Skip to content

Commit

Permalink
🐞 metafizzy#53 fix chrome touch dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Jun 7, 2019
1 parent 37b8422 commit 125bda0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/dragger.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ Dragger.prototype.create = function( options ) {

Dragger.prototype.bindDrag = function( element ) {
element = this.getQueryElement( element );
if ( element ) {
element.addEventListener( downEvent, this );
if ( !element ) {
return;
}
// disable browser gestures #53
element.style.touchAction = 'none';
element.addEventListener( downEvent, this );
};

Dragger.prototype.getQueryElement = function( element ) {
Expand Down

0 comments on commit 125bda0

Please sign in to comment.