-
Notifications
You must be signed in to change notification settings - Fork 3.2k
can not bring up keyboard instantly in ios 11.3 #548
Comments
I encountered it too. There seems to be a big problem on IOS 11.3, mainly on form elements. |
Any workarounds for this? |
+1. <html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no, email=no">
</head>
<body>
<input id="test" type="text" placeholder="test" />
<input id="test2" type="text" placeholder="test" />
<script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.js"></script>
<script>
window.FastClick.attach(document.body);
document.getElementById('test').onclick = function(e) {
// works fine
e.target.focus();
};
document.getElementById('test2').onclick = function(e) {
// not working
setTimeout(function() {
e.target.focus();
}, 50)
};
</script>
</body>
</html> |
There is a more serious problem. When "home" is pressed away from browser temporarily, all elements are clicked without response. |
The people behind Framework7io could have found the reason and solution.
The commit that fixes the problem could be found here: framework7io/framework7@ac02ad1 |
@ronnievdc |
change the focus method, |
line 336 you there is a bug: should read
|
add targetElement.focus(); |
@yylgit 解决了,哥们! |
@tabtang 怎么解决的姐们,是用我写的这种方法吗 |
Text areas also seem to be affected |
@yylgit 是用的你的方法!(我也是哥们) |
我这里试了 textarea也没有问题了 |
楼上:yylgit 修改为正解,亲测可用 |
I was running in to this issue on iOS 11.3 + iPad + Cordova + UIWebView + Fastclick 1.0.6. This issue did not happen on iOS 9.3.5 + iPad + Cordova + UIWebView + Fastclick 1.0.6. I was able to reproduce it by:
As @yylgit said, adding Does anyone know if adding that |
…iling ftlabs#548 Fix focusing on form elements, when tapping fast.
to me as well... targetElement.focus(); before targetElement.setSelectionRange(length, length); fixes the issue. |
iOS11.3 fastclick.js 相关bug |
@yylgit 你好,我是11.4的系统,打包hbuilder打包APP之后在ios上input输入框不能轻触弹出键盘,而要在输入框上停留一段1秒左右才会弹出键盘,以上你们讨论的方法我试了些还是不行,请问可以指教一二吗? |
@lasselaakkonen 我加了这个targetElement.focus();还是没解决到,还是快速点击input不能弹出键盘 |
iOS11.3 + 都有这个问题,这种方式的确解决了,那是不是说明iOS11.3版本以后就不需要fastClick了? |
@yylgit 加上了textarea还是没效果 |
@yylgit ios系统12.2 |
@yylgit 解决了,是缓存原因 |
为啥npm不发新版 |
There is a weird behavior in ios 11.3.
From the second time I click the input element on,
the keyboard does not show up when i quickly click the input.
Only if i keep touching the input, the keyboard shows up.
Use code below to reporduce the problem.
The text was updated successfully, but these errors were encountered: