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

115
Vistas
onKeyPress input field focus in Wix

I've put together a working code setup for a wix dynamic page that runs through a repeater and filters for the text included in an input field. This is great barring for 1 quirk - after the timeout, the text input submits and you aren't able to carry on typing. I want the focus to remain on the input even after the timeout.

The relevant code is below - I've tried to retain the focus on the relevant input:

export function addressSearchBox_keyPress(event, $w) {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w('#addressSearchBox').value, lastFilterCity);
 //logging output to console
 console.log($w('#addressSearchBox').value);

//attempting to refocus to the addressSearchBox
$w("#addressSearchBox").focus();
}, 800);

}

Any idea on why this wouldn't work?

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