Open kidroca opened 1 year ago
Is there any information about updates being made to the Modal Focus Trap logic, or other potential solutions that might resolve the issue in question, such as #2483?
I'm hesitant to begin working on a fix that alters the Modal Focus Trap logic without knowing if changes are already planned or underway.
I have the same issue, are there any updates regarding this?
Is there an existing issue for this?
Describe the issue
When opening a Modal that includes a ScrollView or a VirtualList spanning multiple pages, the ScrollView automatically scrolls to the first element. This issue arises from the modal focus trap logic, even when the
initialScrollIndex
is set to a value other than the index of the first element.To illustrate this issue, please refer to the steps and accompanying video below:
https://github.com/necolas/react-native-web/assets/12156624/aebb5277-a512-463b-a3e7-921961e5d7b8
This issue does not occur in Chrome. It happens only on Safari and mobile Safari.
Expected behavior
Opening a Modal containing a scroll view should not alter the initial scroll position
Steps to reproduce
Environment:
Steps to reproduce:
initialScrollIndex
to a value representing an item located in the middle of the list.Expected outcome:
initialScrollIndex
.Actual outcome:
initialScrollIndex
.Test case
https://codesandbox.io/s/upbeat-lalande-pjq75x
Additional comments
The issue does not seem to occur if we use Chrome