ftlabs / fastclick

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

Chrome for Android - Highlighting sticks around after touch #164

Closed Jaybuz closed 11 years ago

Jaybuz commented 11 years ago

This happens in Chrome Beta (31.0.1650.11) and the current stable version (30.0.1599.82).

Here's a screenshot. The blue clone of the button is the highlight left over from touching the button. It's static unlike the content, so it moves around strangely.

android-chrome-fastclick-highlighting-bug

Can anyone else replicate this?

mattcg commented 11 years ago

More importantly, can you replicate this with a reduced test case that uses an unstyled button? It might be related to hardware accelerated compositing, depending on the style applied to the button.

Jaybuz commented 11 years ago

After a little bit of digging I've found that the highlight floating is caused by it's parent being scrollable (overflow: scroll;).

That's most likely a Chrome bug if anything. (https://code.google.com/p/chromium/issues/detail?id=305597)

I did find that if I removed cursor: pointer; the highlighting doesn't appear, which is probably to expected really.

The highlight sticking around is still caused by fastclick though. See: http://codepen.io/anon/pen/upiBy

Jaybuz commented 11 years ago

See: https://github.com/ftlabs/fastclick/issues/166