Skip to content

Commit bfa3ac5

Browse files
authored
fix(cdk/drag-drop): reset pointer events on descendants (#29370)
When we create the preview and placeholder, we set `pointer-events: none` on them so they don't interfere with the `elementFromPoint` calls, however descendants of the element could be resetting it back to `auto` for themselves. These changes update the reset to prevent it from happening.
1 parent 4db4fc1 commit bfa3ac5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cdk/drag-drop/resets.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66
color: inherit;
77
}
88
}
9+
10+
// These elements get `pointer-events: none` when they're created, but any descendants might
11+
// override it back to `auto`. Reset them here since they can affect the pointer position detection.
12+
.cdk-drag-placeholder *,
13+
.cdk-drag-preview * {
14+
pointer-events: none !important;
15+
}

0 commit comments

Comments
 (0)