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

146
Views
Prevent page scroll when focusing input located inside of a modal

On my website I have a drawer (a modal) containing form with inputs inside. And whenever user clicks on inputs browser tries to center them, but since a drawer is absolutely positioned, it scrolls underlying content instead and absolutely positioned element jumps. This thing happens on iOS devices, both chrome and safari.

Is there a way to fix it? Everything I found online so far doesn't work.

Here is a codesandbox https://codesandbox.io/s/small-water-v1m1tq

And here is a gif

bug recording

Actually this is an old problem that I can't fix for a long time, but recently I noticed that notion has such modals, and they somehow managed to fix this issue.

notion recording

This modal doesn't have top margin, but it doesn't matter. Changed the layout to be like theirs, but nothing helps. Here is a link: https://leather-colby-f69.notion.site/Job-Board-4323320545bb4484bfc1008cff34cebd

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!