ftlabs / fastclick

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

Regression: As of d48c8ba FastClick no longer cancels clicks on scroll #116

Closed matthew-andrews closed 11 years ago

matthew-andrews commented 11 years ago

Regression: As of d48c8ba FastClick no longer cancels clicks on scroll.

http://dev.labs.ft.com/matthew/testcase/android-regression.mov

https://github.com/ftlabs/fastclick/commit/d48c8ba20f651b00df357d72d029bd6482a51ea0

We've only noticed this being an issue on Android (scrolling clickable lists sometimes causes unwanted clicks to fire) but we suspect that is because our use of heavy reliance of ft scroller on iOS, which inadvertently fixes this issue.

We discussed two approaches:

mattcg commented 11 years ago

Hey Mat(t||e) will you share that video on Google Drive (or anything else) please? Getting a 403 for that URL.

rowanbeentje commented 11 years ago

He might have not checked that link ;) Try again now and it should work...

I'm a bit stumped about this one, as scroll events specifically shouldn't bubble...

mattcg commented 11 years ago

Got it, thanks. Which version of Android is that?

rowanbeentje commented 11 years ago

The phone's been tidied away but I think it was 4.x - but this is also reproducible on iOS 6, as long as the scroll ends up in roughly the same place it started, or the scroll was fairly small.

mattcg commented 11 years ago

Ok, thanks. Now I understand the bug.

matthew-andrews commented 11 years ago

Apologies for the dead link :see_no_evil:. Also I think it was honeycomb?

rowanbeentje commented 11 years ago

As it was a smallscreen device, no, I don't think it was honeycomb ;)

matthew-andrews commented 11 years ago

Right must have been iOS 4 then. I don't know android.

mkai commented 11 years ago

This might be related to #122, although I've experienced the behavior described on iOS 6 in all versions > 0.5.0.

nicmar commented 11 years ago

I'm having the same issue on iOS 6.1.4, but not on iOS 6.0.1. It seems to happen sometimes during a scroll while the finger is still on the screen. Also it seems to happen mostly if I reload the page, click a non-clickable element, then start to scroll by putting my finger on a clickable area.

So it doesn't seem to happen anymore after scrolling a bit on the page. Can anyone confirm this?

jerryorr commented 11 years ago

@nicmar I'm seeing similar issues, but I'm having a hard time figuring out exactly what triggers the unwanted click. Sometimes it'll fire when drag-scrolling an element, sometimes not, and I haven't figured out why.