Search code examples
focusfirefox-osvirtual-keyboard

How to show keyboard programmatically in Firefox OS?


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?


Solution

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