点击滚动列表会为错误的元素生成点击事件 [英] Tapping on scrolled list generates tap event for wrong element

查看:181
本文介绍了点击滚动列表会为错误的元素生成点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的HTML5网站在滚动列表时会为错误的元素生成点击事件。

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

要重现:

1)访问iPhone或iOS设备上的 www.tekiki.com 。快速滚动列表。

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

2)在列表仍在滚动时点击其中一项。

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

显示错误的项目,因为为错误的元素生成了tap事件。

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

我们正在使用jQuery Mobile 1.4。

We're using jQuery Mobile 1.4.

我们如何解决这个问题?

How can we fix this?

推荐答案

这可能是300ms延迟的问题。使用快速点击库来消除延迟。这也改善了网站的ui行为和感觉。

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.

这篇关于点击滚动列表会为错误的元素生成点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆