Skip to content

Scroll behavior issue in KeyboardAwareScrollView after navigating between two modals #754

Closed
@Foxenz

Description

@Foxenz

Describe the bug
I am using two modals (Modal1 and Modal2), each containing a ScrollView filled with inputs. These inputs are wrapped inside a KeyboardAwareScrollView to handle scrolling when the keyboard opens.

Issue: the scrolling behavior is no longer correct. The header of Modal1 is also affected by the scroll.

The issue only occurs when navigating between two modals, both of which use a KeyboardAwareScrollView.
I’ve confirmed that each modal works fine independently, but returning to the first modal after interacting with the second one seems to "break" the scroll behavior.

Repo for reproducing
repo link

To Reproduce
Steps to reproduce the behavior:

  1. Open Modal1 and click on an input. Scrolling works as expected: the input is properly moved above the keyboard.
  2. Navigate to Modal2 and click on an input. The behavior is also correct.
  3. Navigate back to Modal1 and click on an input again.

Expected behavior
Want to keep the same behavior as in the beginning

Screenshots

Record_2025-01-13-17-55-21.mp4

Smartphone (please complete the following information):

  • Desktop OS: [Windows 11]
  • Device: [One Plus Nord]
  • OS: [Android 12]
  • RN version: [0.76.6]
  • RN architecture: [new]
  • JS engine: [Hermes]
  • Library version: [1.15.2]

Metadata

Metadata

Assignees

Labels

KeyboardAwareScrollView 📜Anything related to KeyboardAwareScrollView componentquestionYou wanted to clarify something about the usage of the library or have a question about somethingrepro providedIssue contains reproduction repository/code🐛 bugSomething isn't working🤖 androidAndroid specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions