简体   繁体   English

Android 键盘关闭输入焦点

[英]Android keyboard closing on input focus

tried to find the topic about what happening in one of my works, but I couldn't.试图找到关于我的一件作品中发生的事情的主题,但我找不到。

When the Android user in Chrome tap to fill a input on my form, the Keyboard appears but suddenly closes immediately.当 Chrome 中的 Android 用户点击以在我的表单上填写输入时,键盘出现但突然立即关闭。 Not giving a chance for user start to fill...不给用户开始填充的机会......

URL FOR EXAMPLE: http://selva.club/agenda/transa-amazonica-%E2%99%A1-jaloo-show-ao-vivo/示例网址: http : //selva.club/agenda/transa-amazonica-%E2%99%A1-jaloo-show-ao-vivo/

VIDEO RECORDING FOR EXAMPLE: https://www.dropbox.com/s/dfb9nkgt7e3zm9u/Video%2023-04-17%2013%2054%2035.mov?dl=0视频录制示例: https : //www.dropbox.com/s/dfb9nkgt7e3zm9u/Video%2023-04-17%2013%2054%2035.mov? dl =0

After a whole day spent... Just realized what it happens... I have on window.resize event, just cleared this one and it stops the problem.经过一整天的时间......刚刚意识到它发生了什么......我有window.resize事件,只是清除了这个事件并阻止了问题。 Sorry for the inconvenience.带来不便敬请谅解。

In my case I observed similar behavior when i accidentally updated the innerHTML:就我而言,当我不小心更新了 innerHTML 时,我观察到了类似的行为:

HTML HTML

<form id="myform">
  <input>
</form>

Javascript Javascript

if(someaction) myform.innerHTML+= "some notice";

Here someaction effectively destroys and recreates the input and thus closes the virtual keyboard.这里someaction有效地破坏并重新创建输入,从而关闭虚拟键盘。

myform.appendChild() keeps the old input focused myform.appendChild()保持旧输入的焦点

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

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