che*_*000 6 safari iframe input touch ipad
我有一个页面有iframe,iframe中有几个文本输入,div中有输入换行.div听着touchstart事件.这是演示页面:1)index.html
<body >
<iframe width="950px" height="650px" src="http://192.168.100.14/demo/test.html">
</body>
Run Code Online (Sandbox Code Playgroud)
2)的test.html
<body>
<div id="test" >
<input name="name" id="name" /><input name="age" id="age"/>
</div>
<script>
var test = document.getElementById("test");
test.addEventListener('touchstart', function(){}, false);
</script>
</body>
Run Code Online (Sandbox Code Playgroud)
问题是:1:键盘将解除并显示输入元素中的click事件.这甚至会在相同的输入中发生.2:当手指按下输入时,输入元素中没有出现复制和粘贴以及选择文本.
但如果不听div touchstart事件或者不在iframe中听test.html,则不会发生这些事件.我搜了好几天但找不到答案.有人可以帮忙吗?谢谢.
| 归档时间: |
|
| 查看次数: |
2326 次 |
| 最近记录: |