Skip to content

Commit d37910a

Browse files
committed
Update to latest taphold
1 parent 7d756b5 commit d37910a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/jquery-taphold/taphold.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@
9797

9898
// Determine if touch events are supported.
9999
var touchSupported = ("ontouchstart" in window) // Most browsers
100-
|| ("onmsgesturechange" in window); // Mircosoft
100+
|| ("onmsgesturechange" in window); // Microsoft
101101

102102
var taphold = $.event.special.taphold =
103103
{
104104
setup: function(data)
105105
{
106-
$(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler)
107-
.bind((touchSupported ? "touchend" : "mouseup"), stopHandler)
108-
.bind((touchSupported ? "touchmove" : "mouseleave"), leaveHandler);
106+
$(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler)
107+
.bind((touchSupported ? "touchend" : "mouseup"), stopHandler)
108+
.bind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler);
109109
},
110110
teardown: function(namespaces)
111111
{
112-
$(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler)
113-
.unbind((touchSupported ? "touchend" : "mouseup"), stopHandler)
114-
.unbind((touchSupported ? "touchmove" : "mouseleave"), leaveHandler);
112+
$(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler)
113+
.unbind((touchSupported ? "touchend" : "mouseup"), stopHandler)
114+
.unbind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler);
115115
}
116116
};
117117
})(jQuery);

0 commit comments

Comments
 (0)