Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
Virtual keyboard does not appear when focusing textarea with JavaScript unless a physical touch has been done first (Huawei Android Google Chrome)

when I set focus on a textarea with textarea.focus(); it won't open the virtual keyboard, unless I execute a physical touch on the page before.

A) I open the page on my SmartPhone. The page simply contains this code:

<textarea id="textarea"  rows="5" cols="20">
test
</textarea>

Then I execute the following code:

textarea.focus();

-> The textarea has focus now, the cursor inside the textarea appears, but the virtual keyboard does not open.

B) I open the same page on my SmartPhone.

This time I touch the page on a random position (just not inside the textarea. The textarea at this point has no focus).

Then I also execute the same code:

textarea.focus();

-> The textarea has focus now, the cursor inside the textarea appears, BUT this time the virtual keyboard actually appears.

A synthetic touch, createt like this, also does not work:

// Create a synthetic click MouseEvent
  let evt = new MouseEvent("click", {
    bubbles: true,
    cancelable: true,
    view: window
  });

Can anyone help me?

Kind regards Robin

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda