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

192
Views
Scrolling to a specific element on focus, when the keyboard opens, in a webview on android

I'm working on a React Native application that displays a website in a webview, the website is also under my control.

When the user focuses a specific text input inside the webview, I use window.scrollTo to scroll the user so that the TextInput is near the top of their screen. However, of course on mobile, when a user focuses a text input, it also often opens their soft input.

On Android (the only platform I've tested and am targeting), this causes the entire window to resize. Unfortunately, this causes my scroll to be canceled. I'd like that to not be the case.

So far I've tried scrolling after a timeout of about 200ms, but it's way too inconsistent and I'm not comfortable with the solution. I've also tried setting my RN activity's softInputMode to adjustPan, adjustResize, and adjustNothing, none of which seem to prevent the webview from resizing when the soft input is opened.

How can I:

  • Either prevent the window from resizing when the soft input is opened or
  • Reliably scroll to a specific position even when the window resizes?
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!