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

116
Views
Preventing scroll to a non-programmatically focused element

I have a table with some sticky columns. In the first column, there's a checkbox. The problem is that whenever I focus a checkbox (with tab or simply clicking on it), my table scrolls to the left. I understand why it happens - the browser wants to make sure a focused checkbox is in the viewport. But since for me it's always in the viewport (sticky), this behavior doesn't help.

I know that it can be done for programmatically-driven focus:

element.focus({ preventScroll: true });

But how about the default focus handled by the browser?

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!