4 Replies Latest reply on Dec 7, 2016 6:45 AM by ezisezis

    DisallowOverscroll not working

    ianhowse Level 1

      My (only) config.xml contains -

      <preference name="DisallowOverscroll" value="true" />

      and yet I am still getting bounce.
      I have tried it with the older -

      <preference name="UIwebviewbounce" value="false" />
      <preference name="webviewbounce" value="false" />

      and all combinations.
      I am using Build cli-6.1.0 (iOS 4.1.0) on an iPhone5
      I see this topic has been discussed previously on this and other forums, but I've tried all those answers to no effect, so hoping there was something else I'm missing.

        • 1. Re: DisallowOverscroll not working
          shotts@adobe Adobe Employee

          Can you share your entire config.xml?


          It's also possible that the setting is working correctly -- the preference only affects the webview itself. If your app has a scrollable element that uses native scrolling, that container can still bounce. Depending on how you've built your app, it's possible that would mean your entire app would still bounce -- that is, if your navigation bars and such were within a single containing element with scrolling enabled. As such, it might help to see your index.html or your app's HTML structure.

          • 2. Re: DisallowOverscroll not working

            I think I have the same problem. you are describing at your comment that on the main screen its fine but the dynamic data still has dissallowOverscroll=false. How can I change this setting with js code or what?


            • 3. Re: DisallowOverscroll not working
              shotts@adobe Adobe Employee

              DisallowOverscroll only works on the web view's scroll container. So if you have "overflow: scroll" and "-webkit-overflow-scrolling: touch" on a container, it will continue to bounce.


              Without seeing your DOM structure, it's a little difficult to be of more assistance. Can you share what your DOM looks like with this page loaded? Share relevant styles as well.

              • 4. Re: DisallowOverscroll not working
                ezisezis Level 1

                It is an iframe that is misbehaving, so I found a workaround on making it very very long with static length, however there is a problem with my scrolling still. Sometimes it behaves as I wish, sometimes not.

                I have a cordova app witch upon a touch opens up a new iframe that is wrapped inside a div. Roughly like this:


                   <div style="padding:0; overflow:auto;-webkit-overflow-scrolling:touch;height: 10000px;">
                <iframe id="1" style="height: 100%;width: 100%;border: none;" src="iframe.html"></iframe>


                But the iFrame does not scroll how i want all the time, it glitches. See video

                I think this is because I am scrolling the DIV in the background but when i somehow touch iframe it does not scroll. Any help will be appreciated.