Click events fire twice in iscroll lite! #270
Comments
Same problem here. Doesn't seem to affect Chrome for Android or iOS Safari. Just the default browser in |
Here's a demo: http://adjohnson916.github.com/iscroll-bugs/click-twice/ |
in html href="javascript:void(0)" onclick="location.href=(' '); and in xml android:launchMode="singleInstance" |
I found a fix to this. what was happening is that if I have link inside the iscroll 4 wrapper, on ipad 1, iOS5.1.1 once the new window opens, then when I close it, it triggers the same window again. some issue with iscroll. replace the following lines onBeforeScrollStart: function (e) { e.preventDefault(); }, with the following onBeforeScrollStart: function (e) { e.stopImmediatePropagation(); }, |
I fixed by the following: $(selecter).on('touchstart', function(e) { this will only fire once! |
I use on('tap',....) instead of onclick to avoid this problem. |
I have implemented a pretty aggressive solution to this problem. Please update to the latest version and let me know. |
Im using iscroll for an android app with a webview and when i click in something the action fires twice.
I tried this
https://groups.google.com/forum/#!topic/iscroll/XL2Ny9gpKc0
but it didnt work. Im running jellybean and I heard some people had problems with it too but I cant find a way to fix it.
ANY HELP???
edit: im using this version of i scroll lite
http://cubiq.org/dropbox/iscroll4/src/iscroll-lite.js?v4
What fires twice are some hyperlinks that open new activities in android
The text was updated successfully, but these errors were encountered: