Does Android browser lock DOM on touchStart?

2019-05-26 22:47发布

问题:

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.