-
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
bug(cdkDrogList): dragRef._previewRect is set after scroll #24497
Labels
area: cdk/drag-drop
G
This is is related to a Google internal issue
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
crisbeto
added
area: cdk/drag-drop
G
This is is related to a Google internal issue
has pr
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triage
This issue needs to be triaged by the team
labels
Mar 1, 2022
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Mar 1, 2022
Fixes a null pointer exception that can happen if the page is scrolled before the user has scrolled the minimum distance. The problem was that we were expecting for the dimensions to be defined by the time the user has had the chance to scroll, but in some cases that can be circumvented. These changes move the measurement to a getter method so that they're guaranteed to be available when they are requested. Fixes angular#24497.
crisbeto
added a commit
that referenced
this issue
Mar 1, 2022
#24498) Fixes a null pointer exception that can happen if the page is scrolled before the user has scrolled the minimum distance. The problem was that we were expecting for the dimensions to be defined by the time the user has had the chance to scroll, but in some cases that can be circumvented. These changes move the measurement to a getter method so that they're guaranteed to be available when they are requested. Fixes #24497. (cherry picked from commit 37be099)
crisbeto
added a commit
that referenced
this issue
Mar 1, 2022
#24498) Fixes a null pointer exception that can happen if the page is scrolled before the user has scrolled the minimum distance. The problem was that we were expecting for the dimensions to be defined by the time the user has had the chance to scroll, but in some cases that can be circumvented. These changes move the measurement to a getter method so that they're guaranteed to be available when they are requested. Fixes #24497.
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. |
forsti0506
pushed a commit
to forsti0506/components
that referenced
this issue
Apr 3, 2022
angular#24498) Fixes a null pointer exception that can happen if the page is scrolled before the user has scrolled the minimum distance. The problem was that we were expecting for the dimensions to be defined by the time the user has had the chance to scroll, but in some cases that can be circumvented. These changes move the measurement to a getter method so that they're guaranteed to be available when they are requested. Fixes angular#24497.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: cdk/drag-drop
G
This is is related to a Google internal issue
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I got the error when dragging a cdkDrag element with a boundary element:
After a little logging I believe that is because
_listenToScrollEvents
is called after_pointerMove
, so in_listenToScrollEvents
the_previewRect
isundefined
.Reproduction
Steps to reproduce:
Expected Behavior
The element can be dragged without error.
Actual Behavior
There is an error due to undefined
_previewRect
.Environment
The text was updated successfully, but these errors were encountered: