iOS 8 Safari - Can't scroll element's content when page is zoomed

对着背影说爱祢 提交于 2019-12-29 06:25:30

问题


This issue happens only in iOS 8 (8.1 to be exact). It does not reproduce in iOS 7.

The use-case: Scrolling inside an element with scrollable (long) content.

If the page is not zoomed-in - it works as expected.

When you zoom-in the page - it stops working, the page is scrolled instead (as if you reached the end of the scrollable content). The effect is continuous: the higher the zoom - it's less possible to scroll the content.

Test page: here

Open the link in your iOS 8 Safari - see that the list element is scrollable.

Now zoom-in the page and try to scroll the content of the list - the page is scrolled instead of the items inside the list. I've placed the red markers so it will be easy to see that the page is scrolled.

I've tried different CSS rules and even JS to prevent the page from scrolling (that still does make the content of the element scroll).

Has anyone encountered this behaviour or has a suggestion how to fix it? I really don't want to implement content scrolling with JS.

Disabling the zoom on the page (with meta viewport) is not an option for me.

来源:https://stackoverflow.com/questions/27968453/ios-8-safari-cant-scroll-elements-content-when-page-is-zoomed

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