简体   繁体   中英

Disable touch event on document in Firefox 4 for Android

I can disable touch events on android's webkit browser by the code below.

$(document).bind('touchmove', function(e){epreventDefault();}); 

But it seem not working on the new Firefox 4 for Android. Any idea how to do that?

$(document).bind('MozTouchMove', function(e){e.preventDefault();});   

I would assume this should work. The difference is that Mozilla calls their touch events different names:

MozTouchDown: "Sent when the user begins a screen touch action."
MozTouchMove: "Sent when the user moves his finger on the touch screen."
MozTouchUp:   "Sent when the user lifts his finger off the screen."

PS It's "e.preventDefault();" ... you forgot the "." in your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM