madrobby/zepto — Issue #330: Can't unbind tap events
Author: pamelafox
Created: 2011-11-21 23:58:57+00:00
State: open

I'm using touch.js for touch events on Android. I have code that occasionally gets run twice, but I only want the event listeners set up once, so I do:

dom.unbind('tap', callback);
dom.bind('tap', callback);

However, from what I can tell, the callback isn't actually unbound from the tap event. I think that's because the handlers set stores the callbacks under touchstart/touchend, not under 'tap', so unbind() fails to find any handlers to remove.