通过移动Safari中的输入字段进行选项卡使浏览器跳转 [英] Tabbing through input fields in mobile Safari makes browser jump
本文介绍了通过移动Safari中的输入字段进行选项卡使浏览器跳转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
演示
)
但是,如果需要与位置进行交互,则该修复方法不起作用:fixed 元素。跳跃的问题依然存在。
Is there a way to focus on the field, but without this jarring animation? The behavior is especially bad when the keyboard is visible.
Demo
http://plnkr.co/edit/9OydOFO0KUeKuaH8u70A?p=info
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<form>
<input>
<input>
<input>
<input>
<input>
...
<input>
</form>
</body>
</html>
解决方案
After some more research, this appears to be related to a focus jumping bugs in iOS. (https://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios#focus-jumping)
One neat trick that fixed it some instances was to set float: left; clear: left;
on the input field (Jumping input fields in Safari)
But that fix doesn't work if it needs to interact with a position: fixed
element. The jumping bug persists.
这篇关于通过移动Safari中的输入字段进行选项卡使浏览器跳转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文