# ios-input **Repository Path**: BlendZ/ios-input ## Basic Information - **Project Name**: ios-input - **Description**: No description available - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-02 - **Last Updated**: 2021-10-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ios-input ### 为了解决IOS 微信一屏 input,textarea, 失焦后页面不回到原始位置,尤其是一屏式H5 ``` js !function () { if (document.querySelector("body").clientHeight > window.innerHeight) { return false } let t = null $("body").on('focus', 'input,textarea', function () { if (t) clearTimeout(t) }); $("body").on('blur', 'input,textarea', function () { t = setTimeout(() => { document.body.scrollTop = document.documentElement.scrollTop = 0; }, 200) }); }() ```