ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.66k stars 3.23k forks source link

Android Chrome clicking 'selects' everything and can't remove #13

Open chrickso opened 11 years ago

chrickso commented 11 years ago

Hey, just noticed, only in Android Chrome, I frequently get this issue where a touch will 'select' the whole div.container, highlighting it all blue, and I can't click out of it. Kind of annoying.

Also, it's all pjax so lots of time i'll click on a button and everything will load right but the button will stay selected until you click off it.

check out www.tagxt.com on android chrome to see what I mean.

mattcg commented 11 years ago

Is there a reason why you're using ::selection with a background color globally? Even when the whole layer is selected and has a blue background, I can see that tapping on links works. I'm using Chrome on Android 4.0.

chrickso commented 11 years ago

it came with html5boilerplate. its what changes the colors when u highlight stuff.

ya everything still works but it can be annoying to see everything stay highlighted. don't think it has anything to do with that ::selection code tho. On Oct 24, 2012 9:18 AM, "Matthew Caruana Galizia" notifications@github.com wrote:

Is there a reason why you're using ::selection with a background color globally? Even when the whole layer is selected and has a blue background, I can see that tapping on links works. I'm using Chrome on Android 4.0.

— Reply to this email directly or view it on GitHubhttps://github.com/ftlabs/fastclick/issues/13#issuecomment-9740952.

Pointy commented 11 years ago

I see this also, more on my Nexus 7 (4.1) than on my phone (4.0.3). Scrolling is usually enough to "unselect" stuff.

tammosito commented 11 years ago

I have the same problem on Nexus 4 (android 4.2), any solutions yet?

dryabov commented 11 years ago

@chrickso @Pointy @tiammosito Maybe it's selected because of simulated mousedown/mouseup events (at least in desktop version paragraph is selected after dblclick+mousedown and logging proves that each mousedown event is accompanied by following selectstart and selectionchange events). Could you try this patch https://raw.github.com/dryabov/fastclick/master/lib/fastclick.js

mattcg commented 11 years ago

@tiammosito, yes please try @dryabov's patch and let us know how it goes :) Unfortunately I won't have access to an Android device for another week or so.

af commented 11 years ago

Just tried @dryabov's patch on Chrome/Android and still seeing the problem. Any other ideas for how to fix this?

hannesjohansson commented 11 years ago

Experiencing this problem as well on Chrome for android.