Skip to content

Commit

Permalink
Fix touched event on touch devices
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomic authored and szimek committed Feb 20, 2016
1 parent 00743fc commit 7021319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signature_pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ var SignaturePad = (function (document) {

this._canvas.addEventListener("touchstart", this._handleTouchStart);
this._canvas.addEventListener("touchmove", this._handleTouchMove);
document.addEventListener("touchend", this._handleTouchEnd);
this._canvas.addEventListener("touchend", this._handleTouchEnd);
};

SignaturePad.prototype.on = function () {
Expand All @@ -164,7 +164,7 @@ var SignaturePad = (function (document) {

this._canvas.removeEventListener("touchstart", this._handleTouchStart);
this._canvas.removeEventListener("touchmove", this._handleTouchMove);
document.removeEventListener("touchend", this._handleTouchEnd);
this._canvas.removeEventListener("touchend", this._handleTouchEnd);
};

SignaturePad.prototype.isEmpty = function () {
Expand Down

0 comments on commit 7021319

Please sign in to comment.