【发布时间】:2012-09-04 02:29:20
【问题描述】:
我的 webview 应用程序在比 Jelly Bean 更早的 android 版本中可以正常处理 touchend 事件。但是在 Jelly Bean 中,touchend 事件是不可靠的。特别是在可滚动的 div 上,有时不会触发 touchend 事件,整个应用程序停止响应任何 touchend 事件,我收到带有标签“webcoreglue”和文本“不应该发生:没有基于 rect 的测试节点”的日志消息成立” 现在,在我滚动一点之后,它开始正常响应 touchend。 请帮忙。
HTML
<div id="srpanel" class="panel">
<div class="main sr-list">
<div class="sr-list-item-action">
</div>
</div>
</div>
JS
$('.sr-list-item-action').bind('touchend', function(){
//some code
});
我在 for 循环中为列表中的每个项目使用 div 'sr-list-item-action'。
因此,单击列表中的某个项目仅在某些情况下有效。否则,当它不起作用时,整个屏幕实际上会被冻结并停止接收任何 touchend 事件,直到我滚动为止。
我观察到的另一件事是,当我转到列表的下一页时,当我执行$(document).scrollTop(); 时,这种情况发生得更多。不确定这是否相关。
【问题讨论】:
标签: android-webview android-4.2-jelly-bean