@dunghoang69 wrote:
I cannot setFocus() by the code like, my code
ionViewDidEnter() {
// Set timeout wait keyboard ready setTimeout(() => { this.myInput.setFocus(); }, 20000);}
I also add this to the config.xml: preference name=“KeyboardDisplayRequiresUserAction” value=“false” \I used isFocus() to check the status , it always return false. This problem only on android 9 device, on some old devices, it worked normally.
(My case: Open the app, open keyboard automatically.)After test and take a lot of time for it . I figured out that i have to click once time at the start up time to screen. After that it work perfectly (i can set focus to the input and open keyboard automatically).
I don’t know why? Anyone know this problem? Please help me. Why we have to click once time to the screen to make it work? Can we don’t need to do that?
Posts: 1
Participants: 1