Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!