Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'events_handling' of github.com:rromanchuk/Zepto-onPress…

… into events_handling

Conflicts:
	static/script.js
	static/zepto.onpress.js
  • Loading branch information...
commit cfe704c4cf402dc8d5238484882ef1c398c5cdb4 2 parents dc381bf + 4747e62
Ryan Romanchuk authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  static/zepto.onpress.js
3  static/zepto.onpress.js
View
@@ -104,7 +104,6 @@
args[0] ? that.off('touchend.onpress', args[0], handleTouchEnd) : that.off('touchend.onpress', handleTouchEnd);
};
-
callbacks.push(args[1]);
handlers.push(handleTouchStart);
@@ -127,11 +126,13 @@
if (args[1]) {
i = (typeof callbacks !== 'undefined') ? callbacks.indexOf(args[1]) : -2;
+
if (i < 0) { // Something went terribly wrong and there is no associated callback/handler
return;
}
if (args[0]) {
this.off('touchstart.onpress', args[0], handlers[i]);
+
//this.off('click.onpress', args[0], this[0].handlers[i]);
this.off('press.onpress', args[0], args[1]);
}
Please sign in to comment.
Something went wrong with that request. Please try again.