Skip to content

Commit 219e1f5

Browse files
authored
fix(cdk/drag-drop): add conditional to scroll update (#23337)
1 parent 675d82e commit 219e1f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cdk/drag-drop/drag-ref.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@ export class DragRef<T = any> {
13981398

13991399
// ClientRect dimensions are based on the scroll position of the page and its parent
14001400
// node so we have to update the cached boundary ClientRect if the user has scrolled.
1401-
if (this._boundaryRect && target.contains(this._boundaryElement)) {
1401+
if (this._boundaryRect && target !== this._boundaryElement &&
1402+
target.contains(this._boundaryElement)) {
14021403
adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);
14031404
}
14041405

0 commit comments

Comments
 (0)