Permalink
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...
rromanchuk committed Apr 18, 2012
2 parents dc381bf + 4747e62 commit cfe704c4cf402dc8d5238484882ef1c398c5cdb4
Showing with 2 additions and 1 deletion.
  1. +2 −1 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]);
}

0 comments on commit cfe704c

Please sign in to comment.