通过 Adobe AIR 关闭 iOS 上的软键盘
...有办法做到这一点吗?
我正在开发一个游戏项目,其中 iPad 会公开展示,玩家可以在分数提交表单中输入他们的姓名和电子邮件。但是,如果设备在 120 秒内无人看管,则会自动返回标题屏幕。问题是,如果在软键盘仍然打开的情况下发生这种情况,并且超时发生并且文本字段和键盘随后仍然显示(直到有人手动关闭它),则软键盘不会关闭。不用说,这非常糟糕。还没找到这方面的API。也许有解决方法?将焦点放在其他事情上似乎并不能解决问题。
... any way to do this?
I'm working on a game project where iPads are displayed in public and players can enter their names and email into a score submit form. However if the device is left unattended for 120 seconds after that it goes automatically back to the title screen. The problem is that if this happens while the softkeyboard is still open, it will not be closed if the timeout happens and the textfield and keyboard are still displayed afterwards (until somebody closes it manually). Needless to say that this is very bad. Haven't found any API on this. Maybe there's a workaround? Setting focus to something else seems not to cut it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想通了!将焦点设置为 null 就可以了!
Figured it out! Setting focus to null does the trick!