1.在ios系统下出现输入框需要点击多次以及重击才能选中的问题,最后发现是fastClick的点击穿透问题,添加如下代码可解决
FastClick.prototype.focus = function (targetElement) {
let length;
if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
length = targetElement.value.length;
targetElement.focus();
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
在light7的源码中添加该段代码可解决
2.IOS环境下软件弹出再收起页面无法恢复,别挤压,在input框blur的情况下可以采用
window.scroll(0,0);解决。