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

124
Vistas
JS on page load debug

A form field with the ID of mainSearch gets focus when the page loads. I am struggling to debug this and find out where that gets set in the source code. Is there a way I can debug this element to see how it is getting focus?

about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

There are several ways to make element autofocused.

  1. HTML only: Just place autofocus attribute.
  2. JS: Use element.focus().

So, if I were you, I'll search for .focus() in sources. Then, make several break points nearby.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Maybe it is because of :focus-visible pseudo-class applies while an element matches the :focus . i also suffered many time with this,then I try

*:focus-visible{
 outline:none!important;
/* your style */
}

about 4 years ago · Juan Pablo Isaza Denunciar

0

try this

console.log(getEventListeners(document.getElementById("mainSearch")));
about 4 years ago · Juan Pablo Isaza Denunciar
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