-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
WindowScroller setting incorrect scrollTop after resizing window height #544
Comments
Paging @andrewbranch; any ideas? Seems related to the recent |
Yep, looks like my addition of Sorry folks, I don’t know how I missed that. 😦 |
We both missed it 😅 No worries. I'm swamped today. I could push out a release if you think you'd have time to fix? But I won't have time to fix. Meetings meetings meetings |
Yeah, I'm already on it. Will have a PR shortly. |
Fix released in version 8.11.1. Thanks for the detailed bug report @juliepagano! And thanks for the quick fix @andrewbranch! ❤️ |
I updated the version of WindowScroller for one of my projects today from
8.8.1
to the current version (8.11.0
) and noticed this bug. More details about the use cases and the specifics of the bug below.To reproduce
To reproduce the bug:
WindowScroller
without specifying the newscrollElement
prop (i.e. you want it to usewindow
). My use case uses aGrid
insideWindowScroller
, but I think a similar issue would occur with other components.scrollTop
is set as expected at this point and everything works well.Grid
or other component inside theWindowScroller
) is off the top of the viewport.scrollTop
is incorrectly set and theGrid
behaves weirdly because it has the wrong scroll value.I took a quick look at the project's
WindowScroller
demo and see similar "weird" behavior when I follow these steps, so hopefully that will be an easy example to work from.Suspected cause
After looking at the changelog and some of the related source code, I suspect this bug came in with the support for a custom target element in v8.10.0. I'm guessing the problem lies in getPositionFromTop and how it is handling the calculations for the
window
use case.Additional details:
I rolled back to my previous version (
8.8.1
) and verified this bug does not exist there.Browser: Chrome 55 on OSX 10.11
Use case in my code:
Grid
inside aWindowScroller
that only uses WindowScroller for vertical scrolling per the documentation that says it should not be used for horizontal scrolling.The text was updated successfully, but these errors were encountered: