ios下input,textarea无法获取焦点的问题

前端之家收集整理的这篇文章主要介绍了ios下input,textarea无法获取焦点的问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<table class="text"><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8

用户交互触发 2、触发事件不能再延时函数中   my colleagues and I found that iOS will only allow focus to be triggered on other elements,from within a function,if the first function in the call stack was triggered by a non-programmatic event. In your case,the call to setTimeout starts a new call stack,and the security mechanism kicks in to prevent you from setting focus on the input.     翻译:我和我的同事发现,iOS将只允许在其他元素上绑定函数来触发focus事件,如果第一个函数调用栈是由非编程触发的事件(这句不知道怎么翻译)。在你的案例中,调用setTimeout开始一个新的调用堆栈,IOS的安全机制开始阻止你触发input元素的focus事件

猜你在找的程序笔记相关文章