0

I have a function that sets auto-focus an input in Chrome.

It works fine on desktop (macOS), but fails on when running on Android.

On Android a keyboard pops up, and I think I hijacks the event flow somehow.

Can I capture or reroute this event somehow in JS?

<input type="text" id="input">

...

function autoFocusInput () {
  this.shadowRoot.getElementById('input').focus();
}
Matthew
  • 1,165
  • 14
  • 32
  • This may be useful https://stackoverflow.com/questions/8335834/how-can-i-hide-the-android-keyboard-using-javascript – GetSet Jul 17 '20 at 12:13

0 Answers0