Skip to content

Commit

Permalink
fix41: Call event.preventDefault before simulating a click event, to …
Browse files Browse the repository at this point in the history
…avoid getting two clicks.
  • Loading branch information
RandScullard committed Dec 19, 2014
1 parent c04e571 commit 83663a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jquery.ui.touch-punch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*!
* jQuery UI Touch Punch 0.2.3
*
* Copyright 2011–2014, Dave Furfero
Expand Down Expand Up @@ -134,6 +134,7 @@
if (!this._touchMoved) {

// Simulate the click event
event.preventDefault();
simulateMouseEvent(event, 'click');
}

Expand Down
2 changes: 1 addition & 1 deletion jquery.ui.touch-punch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 83663a4

Please sign in to comment.