Open sebastianzillessen opened 10 years ago
which was the previous version?
My previous android version? It was 4.4.2 (sorry I had a spelling mistake in the post above, I upgraded to 4.4.3).
do you have a demo page? or does it do the same with one of the iscroll demos?
Yes I have one: http://goo.gl/6NMYy0. If I open it on the browser, I can click the "click-me" link and get a alert. On Android 4.0.4 ( Samsug GT-S7562) it works as well. But on Android 4.4.3 (Nexus 4) it does not work.
can you try the click:true option? Also I would need your full user agent
Ohh wow. With click:true
it is working. But I never had this before... And it is still working for older Android Phones and iOS.
My user agent is
Mozilla/5.0 (Linux; Android 4.4.3; Nexus 4 Build/KTU84L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari/537.36
it's really hard to keep up with all Android versions...
Yes, as a app developer i know that ;)
The click:true
fixes this issue, so I close it! Thanks!
Ok I have to say, that unfortunately it is not working. I get a lot of ghost clicks like described in #742. So probably this is really connected. Has anyone any ideas?
@cubiq This is a new issue with android, and is solved by binding touchcancel to touchend. what happens is when the touch travels off the element a touchcancel is fired and touchend is never fired. For the other android touchevent issues I have a shim here: https://github.com/TNT-RoX/android-swipe-shim
touchcancel is already bound to touchend. have to check on this
HI All, I am also facing the same problem, Below android version 4.x its working fine but android version 4.2 - 4.4 its not working I am using IScroll5 and fast-click and script looks like this myScroll = new IScroll('#wrapper', { useTransform: false, useTransition: false, bounce: false, keyBindings: true, click: true, onScrollStart: function (e) { e.preventDefault(); }, onBeforeScrollStart: function (e) { var target = e.target; while (target.nodeType != 1) target = target.parentNode; if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA' && target.tagName != 'BUTTON' && target.tagName != 'A') e.preventDefault(); } }); Can any one help me to fix this. @cubiq
I can confirm that the clicks in sebastianzillessen's demo don't work for me on Android 4.4.4 both Stock Browser (from Cyanogenmod11) and Chrome 36
This is probably a pixel density issue. Try and divide you minimum thresholds by the devicePixelRatio.
Something like:
absDistX < Math.Round( 10 / window.devicePixelRatio)
Have you succeeded to fix it with that lines of code? Where did you put that @TNT-RoX ?
?
What you need is vclick which is a simulated mouse click for mobile devices. If normal clicks don't work then vclick surely will, as i had the same issue on android.
Unfortunately vclick is only available on JQuery mobile but there maybe something similar like fastclick or other.
The other thing you can try is adding the Hammer Js plugging, not for handling swipes but just for initializing it for the pages you have issues with. This may sort the page out on the device to handle the difference between touch and clicks. I used hammer js together with JQM just for the click issue on Android device and sorted the problem.
Hello,
I use iScroll 4 in one of my cordova 3.2 applications together with AngularJS 1.2. and ngTouch. I updated two days ago to Android 4.4.3 (on my Nexus 4).
Since then, all the click events in my iScroll lists are not working properly anymore. I can click them but they do not react on it, only after 10-20 tries it works sometimes.
Do you have any ideas how to fix this or where it could come from?
Thank you!