iPad IOS7 Page Jump Fix when keyboard closes

Sam Deering

When you click on open space on the ipad the keyboard the page jumps down screen (to try and compensate for the space the keyboard used). This occurs when it wants to keep the input in view when your typing which makes sense and is useful but when you don’t use the keyboard close button it sometimes gets all confused and jumps the page…

To fix include:


Then add this:

        $('body').on("tap", function() {
            // alert('you touched me!');
            window.scrollTo(0, 0);


Or if you want smoother scrolling include this:

        $('body').on("tap", function() {
            // alert('you touched me!');

Source: http://flesler.com/jquery/scrollTo/

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.