Reputation: 1585
It seems that Android webview does not care at all about overflow:hidden
css property when having overflowing divs. I took the code of a great tutorial on GPU transitions with HTML/CSS and add it to a simple phonegap project (github).
This code defines two 100% width divs where one overflows the screen on the right side. Clicking on links makes an GPU acelerated transition that moves the divs.
Despite the included css, one can drag the whole content to the side and thus display the right div unwillingly.
Any thoughts on that?
Thanks
PS: May I precise that I tried most of commonly proposed answereds to overflow issues
Upvotes: 2
Views: 1292
Reputation: 361
In current Chrome versions, cancel the touchmove/touchstart events is not allowed for performace reasons. Intead you can try to set touch-action: none;
on the body tag.
Upvotes: 0
Reputation: 1585
Okay so I figured out how to do it, this is not pretty but has the advantage of really working:
document.addEventListener('touchmove', function(e){ e.preventDefault(); }, false);
Upvotes: 2