DEV Community

CHAITANYA
CHAITANYA

Posted on

Answer: 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;
    }

Top comments (0)