ios 输入框失去焦点,位置回调方法

微信网页开发,ios 在input,textarea 失去焦点后,页面无法回调。

以下方法可解决:

    $("input,textarea").on("blur", function() {
        const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
        window.scrollTo(0, Math.max(scrollHeight - 1, 0));
    });

猜你喜欢

转载自www.cnblogs.com/yiruiheng/p/11738425.html