如何在Firefox OS中以编程方式显示键盘? [英] How to show keyboard programmatically in Firefox OS?

查看:181
本文介绍了如何在Firefox OS中以编程方式显示键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在,问题是,什么时候,什么时候用户添加一些文本输入并点击添加按钮,文本框上的焦点会丢失,所以键盘消失,然后焦点回到文本框。所以,键盘消失,并在短时间内再次出现。你可以想象,这是糟糕的用户体验。



当焦点位于输入按钮时,如何将键盘设置为显式显示?

解决方案

当我点击添加按钮然后做实际添加的东西时,我通过将焦点设置到文本框中来修复它。 b

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item.

Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So, the keyboard disappears and appears again in a short interval. As you can imagine, this is bad UX.

How do I set the keyboard to be shown explicitly when the focus is on the input button?

解决方案

I fixed it by setting the focus onto the textbox first when I click the add button then do the actual adding stuff.

这篇关于如何在Firefox OS中以编程方式显示键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆