Does Android browser lock DOM on touchStart?

南笙酒味 提交于 2019-12-08 01:54:30

问题


I'm trying to build a menu with 5 blocks that the user can spin around.

You can see a demo here: http://m.iijax.com/menu.php

Works fine on iPhone, (if a little sluggish sometimes, but that is beside the point :p ) if i draw my finger more then 90 pixels (which i set as a limit) in either direction the menu spins.

On Android (2.1, a Samsung Galaxy S) however the menu does nothing until i release my finger from the screen, I've tried adding an alert on the 2 functions that changes a bunch of classes around to spin the menu either to the right or left and they do get triggered as I draw my finger.

So my best guess is either the browser locks access to the DOM until touchEnd, or it blatantly cheats and simply shows me some kind of screenshot of the page awaiting touchEnd.

Can anyone confirm either of these theories? I've spent about an hour searching here and on google and found nothing, but maybe I haven't found the rightsearch terms.

I've tried lots of swipe and slider examples I've found however and haven't found anything that animates in real time as i draw my finger.

Would also be interesting to know if this menu works on newer Android versions.

来源:https://stackoverflow.com/questions/5361406/does-android-browser-lock-dom-on-touchstart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!