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

163
Views
Arrow Keys - Prevent Default on Select Element

so I have a little bit of a very specific problem and I was hoping that there's a simple answer that I just haven't yet found.

Basically, I have a select element, and, while selecting an option in the select element I would like to be able to hold down the arrow up and down keys without changing the option, if that makes sense. Essentially, I need to get rid of the native key bindings for the select element so that, while pressing the up or down keys, it does not change the option I want to select. I have tried the following:

select_element.onkeyup = evt => evt.preventDefault();
select_element.onkeydown = evt => evt.preventDefault();

But it does not seem to work. I suppose a last-ditch scenario would be to completely recreate the select element from scratch, but I would really like to avoid that if possible.

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!