Open iscy opened 13 years ago
Here is a patch that fixes the issue by removing the prevent handler on onTouchEnd().
Index: web/touchscroll.js =================================================================== --- web/touchscroll.js (revision 5168) +++ web/touchscroll.js (working copy) @@ -639,6 +639,8 @@ this.startFlick(flickVector, flickDuration); } + + scroller.removeEventListener("click", preventHandler, true); } if(!(this.isAnimating())){ @@ -667,13 +669,15 @@ _preventNextClick: function _preventNextClick(){ var scroller = this.scrollers.container; scroller.style.webkitTapHighlightColor = "transparent"; - scroller.addEventListener("click", function prevent(event){ - event.stopPropagation(); - this.removeEventListener("click", prevent, true); - this.style.webkitTapHighlightColor = ""; - }, true); + scroller.addEventListener("click", preventHandler, true); }, + _preventHandler: function _preventHandler(event) { + event.stopPropagation(); + scroller.removeEventListener("click", preventHandler, true); + scroller.style.webkitTapHighlightColor = ""; + }, + isAnimating: function isAnimating(){ var timeouts = this._animationTimeouts; var hasTimeouts = timeouts.e.length > 0 || timeouts.f.length > 0;
Thanks for the patch … this will be fixed with the rewrite, I just don’t have much time left to finish it at the moment.
This is still happening (at least on Android phones), and I don't see that _preventNextClick function anywhere in the code, so I don't know how can I patch it. Any workaround for this? The project doesn't seem pretty active right now, but i'm hoping someone can answer me.
On the iPhone:
The function: _preventNextClick() is the root cause of this issue. I'm not sure why this function was introduced in the first place... but removing its call from onTouchMove fixes my issue. I think the handler should be removed from onTouchEnd().