Skip to content

Commit 83663a4

Browse files
committed
fix41: Call event.preventDefault before simulating a click event, to avoid getting two clicks.
1 parent c04e571 commit 83663a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

jquery.ui.touch-punch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!
1+
/*!
22
* jQuery UI Touch Punch 0.2.3
33
*
44
* Copyright 2011–2014, Dave Furfero
@@ -134,6 +134,7 @@
134134
if (!this._touchMoved) {
135135

136136
// Simulate the click event
137+
event.preventDefault();
137138
simulateMouseEvent(event, 'click');
138139
}
139140

jquery.ui.touch-punch.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)