How to prevent mobile scrolling when double tapping in PhoneGap?

I am using AppGyver SteroidsJS (mainly PhoneGap with improved performance and my own user interface) to create a web application. I noticed that when I double-click on an element, it will scroll to that element, even if I disabled WebView scrolling. This is a problem because if the contents of the WebView are shorter than the screen size, I cannot even scroll. Can this be fixed somehow? Thanks!

+4
source share
1 answer

There was some discussion of the delay in disconnecting PhoneGap and the double-tap problem. For example, check out this StackOverflow stream: Phonegap iOS app screen smoothes with a double tap

I also tried to figure this out, and here are some approaches I tried:

  • IOS This is specifically for iOS. Try changing the /config.xml file to change "DisallowOverscroll" to true.

    <preference name="DisallowOverscroll" value="true" />
  • HTML Solution: It could be a solution for a single-page web application. Check the meta tag for the viewport app. The general agreement is to output the width and height of the viewport from the device, for example

    <meta name="viewport" content="width=device-width, height=device-height">
    I found that this allows some extra space in the browser area. Hard coding of the device screen size solved this problem for me. For example,
    <meta name="viewport" content="width=1024, height=768">
    canvas html.
    <canvas width=1024, height=768" ...>
    , , iPad.
  • Javascript/JQuery: StackOverflow jQuery. , , : https://gist.github.com/johan/2047491, webapp, .

    $("body").nodoubletapzoom();
    .
+4

All Articles