-
-
Notifications
You must be signed in to change notification settings - Fork 642
Code snippets
obiot edited this page Feb 12, 2013
·
7 revisions
Simply add the following code to your project (note that this require to register on the window document itself and not the canvas)
if (me.sys.touch) {
/* This code prevents the webview from moving on a swipe */
preventDefaultScroll = function(e) {
e.preventDefault();
window.scroll(0,0);
return false;
};
window.document.addEventListener('touchmove', preventDefaultScroll, false);
}
Simply add the following code to your project (note that this require to register on the window document itself and not the canvas)
if (me.sys.touch) {
window.addEventListener("load", function() {
setTimeout(function() {
window.scrollTo(0, 1);
}, 0);
});
}