Open liu-xinhui opened 5 years ago
需要点击好多次文本框,键盘才会弹出
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(); } } //加上这段代码完美解决
我能被这个库气死。接手一下很久的项目看了半天 还奇怪为啥、
在contenteditable的div上试了真的有半天的时间都无解
试试注释掉以前的人在公共文件里写的FastClick.attech(body)就好了,
然后才找到本帖save my day.
需要点击好多次文本框,键盘才会弹出