pbakaus / scroller

Accelerated panning and zooming for HTML and Canvas
MIT License
3.89k stars 422 forks source link

Links don't work on touch screens in Chrome (with enabled touch-events) #40

Open OnkelTem opened 11 years ago

OnkelTem commented 11 years ago

Hi!

I've noticed that click events ain't triggered at all in Chrome (version 29). As result any links in the area with scroller enabled don't work on touch screens.

Steps to reproduce: 1) On a computer with touch screen... 2) Open EasyScroller example: http://zynga.github.io/scroller/demo/easyscroller.html 3) Using Chrome Dev Tools edit a piece of text, adding A-link somewhere. 4) Now try to click on the link, it won't open.

Workaround is to DISABLE touch events in Chrome. Visit internal URL chrome://flags/, and set variable "Enable touch events Mac, Windows, Linux, Chrome OS" from Automatic (default) to DIsabled.

The other problem with emulating touch events using mouse (that's what we get after disabling touch events in Chrome or if using Firefox which doesn't support touch events or has this disabled by default - idk) is that click events occur even if you just scroll the content. I.e. if you start scrolling from touching a link and simply release your finger/mouse touch, then after animation finishes, browser opens the link! Touch-emulation part of the library should disable such clicks.

Genkilabs commented 9 years ago

+1 Using this in Cordova on iOS or in an iOS emulator has the same result; links can not be clicked/tapped.

w3z315 commented 9 years ago

+1 Chrome Browser Version 38.0.2125.111 m

+1 WebView Android

mayurloved commented 9 years ago

Same issue with me.. I have use in my cordova app in browser its work perfect but if i use in mobile then click event not working

benfavre commented 9 years ago

Same.

Benjamin Favre Directeur

T : +33 (0)7 60 48 51 21 E : ben@webdesign29.net Skype : webdesign29 http://www.webdesign29.net/

http://www.webdesign29.net/

2014-12-11 18:45 GMT+01:00 Mayur Panchal notifications@github.com:

Same issue with me.. I have use in my cordova app in browser its work perfect but if i use in mobile then click event not working

— Reply to this email directly or view it on GitHub https://github.com/zynga/scroller/issues/40#issuecomment-66658321.

mayurloved commented 9 years ago

Hello, For IOs i have found the solution Here is the Solution...

e.preventDefault();

Just remove that line from script in index.html page It will work For IOS only

mayurloved commented 9 years ago

And Finally Also Resolved Issue in Android....