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

194
Vistas
Auto focusing on the gmail input field and then auto-filling it

I've gone through all the links that direct me towards using .focus() and/or auto focus(I don't need auto-focus as my work doesn't involve handling the html). I have to focus on the gmail's input field and populate it with the user's email passed.

enter image description here

The following works fine if run separately, it populates the field but if I run it with focus() command it doesn't bring it to focus.

document.getElementById("identifierId").value = "abcdefgxyz@gmail.com";

enter image description here

The commands that I tried running in the console are:

document.querySelector("#identifier").focus()
document.querySelectorAll('input[type=email]')[0].focus(function() {document.getElementById("identifierId").value = "abcdefghijk@gmail.com";})
document.querySelectorAll('input[type=email]')[0].focus()
document.querySelectorAll('input')[0].focus()
document.getElementById("identifierId").value = "abcdefghijk@gmail.com";
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