在IOS8 Safari中,有一个新的位置修复错误.
如果您聚焦固定面板中的文本区域,Safari会将您滚动到页面底部.
这使得所有类型的UI都无法使用,因为您无法将文本输入textareas而无需将页面一直向下滚动并丢失位置.
有没有办法干净地解决这个bug?
#a {
height: 10000px;
background: linear-gradient(red, blue);
}
#b {
position: fixed;
bottom: 20px;
left: 10%;
width: 100%;
height: 300px;
}
textarea {
width: 80%;
height: 300px;
}
Run Code Online (Sandbox Code Playgroud)
<html>
<body>
<div id="a"></div>
<div id="b"><textarea></textarea></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)