I am trying to focus an input element after an alert message in Google Chrome on Android.
The problem is that the focus isnt set on the input element. The keyboard opens but I cant type anything in.
This is my input:
<input id="input" type="text">
<button id="button">Button</button>
I am trying to focus the input on button click
const btn = document.getElementById('button')
btn.addEventListener('click', () => {
alert("Some information")
const input = document.getElementById('input')
input.focus()
})
I tried to add a timeOut to focus but it didnt work.
Is this a Chrome Mobile problem? Because in Firefox Mobile its working as expected.