Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

ios - Issue scrolling div with Safari on iPhone 6+, iPad 3 when zoomed in

It seems that on iPhone 6+ and iPad 3 (devices I've tested so far which reproduce issue) there is an issue with scrolling a div when the page is zoomed in.

When first loading a page with the following basic content, the div has no problem scrolling.

Reproduction

  • Zoom page in a bit so that scale is greater than 1.0. This seems to more often than not 'disable' scrolling for the div either completely or for the most part. The page itself scrolls or 'bounces'.
  • Zoom back out to 1.0 scale and it scrolls again.

The issue can be a bit inconsistent, where sometimes when zoomed in and playing around with touching/moving/scaling the page around the scrolling will work for a bit but unreliably. Only zooming back out seems to reset it so that the div can be scrolled consistently without issue.

This does not seem to reproduce with Chrome on iPhone 6+, iPad 3, iPhone 4 (both Chrome and Safari) as well as several Android phones (Chrome).

Anyone run into this issue and/or know how to resolve? Or am I missing something?

Any information or help appreciated.

#outer {
        border: 1px solid #000;
        width: 100px;
        height: 100px;
        overflow: auto;
        /*
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        */
    }

    #inner {
        width: 100px;
        background-color: cornflowerblue;
    }

    p { margin: 0; }
<div id="outer">
        <div id="inner">
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
            <p>test</p>
        </div>
    </div>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...