0

Our HTML5 site generates the tap event for the wrong element when scrolling through a list.

To reproduce:

1) Visit www.tekiki.com on your iPhone or iOS device. Scroll through the list rapidly.

2) Tap on one of the items while the list is still scrolling.

The wrong item gets displayed because the tap event is generated for the wrong element.

We're using jQuery Mobile 1.4.

How can we fix this?

Crashalot
  • 33,605
  • 61
  • 269
  • 439
  • The solution is to disable listening to tap event when scroll is active. Are you using any third party plugins? – Omar Feb 28 '14 at 09:26
  • Only JQM. How do we know if the scroll is active or not? Could you post this as an answer please? – Crashalot Feb 28 '14 at 09:53
  • It depends how do you handle click/tap on list view items. Do you bind any event on those items? – Omar Feb 28 '14 at 10:05
  • http://stackoverflow.com/a/20281458/1771795 you can find the events here. As I said, it depends on whether you bind any event on `li` or anchor within it. – Omar Feb 28 '14 at 11:07
  • Have you managed to solve it? – Omar Mar 02 '14 at 09:37

1 Answers1

0

Maybe this is an issue with the 300ms delay. Use the fastclick library to remove the delay. This also improves the ui behavior and feel of the site.

tronc
  • 683
  • 4
  • 12
  • 23