在iOS App的WebView环境中,首次打开H5页面时,快速点击输入框唤起键盘,会出现WebView未被顶起导致输入框被键盘遮挡的现象,而按压式点击却无此问题。经排查,根源在于fastclick
插件对iOS系统键盘弹起时页面布局调整的干扰。由于fastclick
会拦截原生的触摸事件处理,干扰iOS系统对键盘弹起时页面布局的正常计算
FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.
FastClick 是一个简单易用的库,用于消除移动浏览器上物理点击与 click 事件触发之间 300 毫秒的延迟。其目的是让您的应用程序减少延迟,提高响应速度,同时避免干扰当前逻辑。