In iOS, when you are at the bottom of the page, use scrollTop (0) to scroll to the top, and the input in the first screen will focus automatically. How to avoid this problem?

function scrollTo(dom, dis, dir = "up") {
    if(dir == "up") { 
        var scroll = function() {
            var timer = setTimeout( function() {
                if(dom.scrollTop() > dis) {
                    dom.scrollTop(dom.scrollTop() -50);
                    // alert(dom.scrollTop());
                    scroll();
                } else { 
                    dom.scrollTop(dis);
                    clearTimeout(timer); 
                    timer = null; 
                } 
            }, 10);
        }
        scroll();
    }
}

call this function to perform scrolling. When you scroll to the top, input will focus automatically. What if you don"t want him to focus automatically?

Mar.06,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b374a5-34430.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b374a5-34430.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?