Android keyboard does not appear when calling focus on sencha text box

my sencha app works in android web browser.

  • when I click the button, I load the custom component (the container with some components and the text field is one of them), and I call the focus () method in the text field. I get the cursor in the text box, but the Android keyboard does not appear.

  • I placed the button in the user component, clicking on the button, I again moved the focus to the text box, this time the cursor goes away for a moment. Why doesn't the cursor stay there?

Anyway, using focus (), I get the cursor in the field, but the Android keyboard does not appear.

Please help me.

Thanks in advance.

+4
source share
1 answer

This code will make the keyboard display.

InputMethodManager inputMgr = (InputMethodManager) getSystemService("A Context".INPUT_METHOD_SERVICE); inputMgr.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0); 

The "context" may be "this" depending on where you call the code.

0
source

Source: https://habr.com/ru/post/1487018/


All Articles