-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(drag-drop): boundary not accounting for scrolling #18612
fix(drag-drop): boundary not accounting for scrolling #18612
Conversation
When the user starts dragging, we cache the `ClientRect` of the boundary so we know the area around which to limit the preview. The problem is that we weren't updating the cached position which cause it to behave incorrectly if the user scrolled after they start dragging. These changes fix the issue by updating cached position. This ended up slightly more complicated than expected, because it has to interact with the auto scrolling. I've also moved around some utilities for dealing with `ClientRect` so that they can be reused. Fixes angular#18597.
a131558
to
d749532
Compare
The feedback has been addressed @jelbourn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When the user starts dragging, we cache the `ClientRect` of the boundary so we know the area around which to limit the preview. The problem is that we weren't updating the cached position which cause it to behave incorrectly if the user scrolled after they start dragging. These changes fix the issue by updating cached position. This ended up slightly more complicated than expected, because it has to interact with the auto scrolling. I've also moved around some utilities for dealing with `ClientRect` so that they can be reused. Fixes #18597.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When the user starts dragging, we cache the
ClientRect
of the boundary so we know the area around which to limit the preview. The problem is that we weren't updating the cached position which cause it to behave incorrectly if the user scrolled after they start dragging.These changes fix the issue by updating cached position. This ended up slightly more complicated than expected, because it has to interact with the auto scrolling.
I've also moved around some utilities for dealing with
ClientRect
so that they can be reused.Fixes #18597.