Disable scrolling when changing focus form elements ipad web app

I’ve found that in UIWebView, document.body is also sometimes moved. So I use:

    input.onfocus = function () {
        window.scrollTo(0, 0);
        document.body.scrollTop = 0;
    }

Leave a Comment