Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

202
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda