2

Is there any way to stop this scrolling when user inputs data on ipad,i tried different things but does not work.

Is there any way to stop this scrolling.

here is my code

             <html lang = "en">
            <head>
            <title>formDemo.html</title>
            <meta charset = "UTF-8" />
            <script>
            $(document).ready(function() {  
                $(document).bind('touchmove', false);


          });

         </script>

         </head>
         <body>
        <h1>Form Demo</h1>
        <form>
       <label for="name">Text Input:</label>
       <input type="text"   name="name" id="inputtext"  onFocus="window.scrollTo(0, 0); value="" style="margin:400px 0 0 0;" />
       </form>
       </body>
       </html>
Jaw Ali
  • 205
  • 5
  • 13

1 Answers1

1

Your question is almost answered here. You only have to combine your logic with:

$(document).bind('touchmove', false); // or true, depends you want to disable / enable
Community
  • 1
  • 1
Raptor
  • 53,206
  • 45
  • 230
  • 366
  • please see my updated question i am using same as you have asked but it is not working – Jaw Ali Jun 20 '13 at 09:20
  • it didn't scroll . in fact, it does not have enough contents to scroll. See: http://static.raptor.hk/noscroll.html Are you talking about bouncing effect of Mobile Safari ? – Raptor Jun 20 '13 at 10:58