Repository navigation
fix(drag-drop): boundary not accounting for scrolling - #18612
Merged
Merged
Conversation
jelbourn
reviewed
Mar 9, 2020
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.
crisbeto
force-pushed
the
18597/drag-drop-boundary-scroll
branch
from
March 15, 2020 14:35
a131558 to
d749532
Compare
Member
Author
|
The feedback has been addressed @jelbourn. |
mmalerba
pushed a commit
that referenced
this pull request
Apr 14, 2020
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 was referenced May 3, 2020
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the user starts dragging, we cache the
ClientRectof 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
ClientRectso that they can be reused.Fixes #18597.