-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with scroll in list-detail components #160
Comments
I'm still facing this problem. I created a very small CodeSandbox here: https://codesandbox.io/s/react-flip-toolkit-scroll-issue-d5csk I have been reading the code and I'm pretty convinced the problem comes from the fact
Here, the bounding client rect is calculated from top of page, because the scroll is still at top before the
I'm trying to move the If anyone can give some clue or direction would be great. I have been playing with handleEnterUpdateDelete, but flippedElementPositionsAfterUpdate are calculated at I realized adding a
makes the bounding client rect calculation right, but I'm sure that's a very dirty patch and also creates a small glitch on animation start. |
I know there are several issues about scrolling already resolved. But I think mine is a different case:
Scenario:
A component ItemsList and a component ItemView, conditionally shown one or another depending on wether an item is selected.
Mobile screen: from the second item some scroll is always needed to reach it.
Content of ItemView is larger than the screen height.
Problem:
For the first and second item (scroll = 0) there's no problem.
For the next items, there are two problems:
window.scrollTo(0, 0)
before or after the state change, the calculation of distance is higher than needed (the effect is the item comes from the hidden bottom of the page).If you need a CodeSandbox I could prepare one.
The text was updated successfully, but these errors were encountered: