ftlabs / fastclick

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

Click triggers unexpectedly, if you stop scrolling element by tap during scrolling inertia #178

Open San4es opened 10 years ago

San4es commented 10 years ago

There is a spike solution http://jsfiddle.net/b7ZC8/ . Tested on iPhone 4S with IOS7.

Steps to reproduce:

  1. Open this sample http://fiddle.jshell.net/b7ZC8/show/ on your device.
  2. Scroll list by fast scroll gesture.
  3. Try to tap on list to stop scrolling during inertia.
  4. Sometimes click fires unexpectedly (see simulated console)

Note, that click fires after tap on inertia, when parent scroll offset on 'touchstart' and 'touchend' events are equal (see simulated console).

Regards, Alexander Ziborov.

ovchinnikov commented 10 years ago

Same problem for me...

tabalinas commented 10 years ago

I faced the same problem. Looks like this fix https://github.com/ftlabs/fastclick/issues/42 doesn't work for 'slow' devices. I have the issue on iPhone 4s (iOS7), while on iPhone 5 (iOS7) everything works just fine.

zyzyxdev commented 10 years ago

Same here (on iPad3/4).

pcompassion commented 10 years ago

@San4es What did you change in your spike fix?

I'm having the same problem on iPhone4.