Phonegap and Android overflow issue

谁说我不能喝 提交于 2019-12-14 03:55:14

问题


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


回答1:


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);


来源:https://stackoverflow.com/questions/19292799/phonegap-and-android-overflow-issue

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