简体   繁体   English

输入文本框隐藏在android浏览器的键盘后面

[英]input text box is hidden behind the keyboard on android browsers

input text box is hidden behind the keyboard on Android browsers, This issue can be solved by set position fixed for inputs but this's not a professional solution and it's causing many of other problems. 输入文本框隐藏在Android浏览器的键盘后面,此问题可以通过为输入固定的设置位置来解决,但这不是专业的解决方案,并且会导致许多其他问题。

Any idea? 任何想法?

The solution is probably a change to your UI. 解决方案可能是更改用户界面。 Most implementations will contain a scrollable div/section 大多数实现将包含一个可滚动的div / section

.container {
    overflow-y: auto;
}

for when the content expands over the container. 当内容在容器上展开时。 This allows the user to continue scrolling without closing the keyboard. 这允许用户在不关闭键盘的情况下继续滚动。 Hope this helps! 希望这可以帮助!

MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y MDN: https//developer.mozilla.org/en-US/docs/Web/CSS/overflow-y

Just add this to your manifest 只需将此添加到您的清单

<activity
            android:windowSoftInputMode="stateHidden|adjustPan">
 </activity>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM