Searchbar setFocus() doesn't open keyboard

I managed to set focus on a Searchbar when a button is clicked, but keyboard won’t open even after setting KeyboardDisplayRequiresUserAction to false in config.xml.

I’m testing it in an Android 4.4.

The code in template:

<ion-searchbar #searchbar></ion-searchbar>

In the class (striped out unrelated lines):

@ViewChild('searchbar') searchbar: Searchbar;

public toggleSearchBar(){
  let timeoutID = setTimeout(() => {
  }, 200)

In config:

<preference name="KeyboardDisplayRequiresUserAction" value="false"/>

What’s happening here? :confused:

I am having the same issue. Have you got any advances on this?

Nothing at all. Guess I’ll have to get rid of the Searchbar and use an input instead.

I’ll let you know as soon as I get it to work.

Thanks, I have been trying also, and I found several forums with the same example that is supposed to work and I haven’t had luck :frowning:

Maybe you’re testing in an Android 4.4 just as I am.

There’s no such thing as luck. :disappointed_relieved: