Skip to content

Commit eee1e7d

Browse files
crisbetojosephperrott
authored andcommitted
fix(drag-drop): disable text selection on draggable element (#12204)
1 parent 56bce47 commit eee1e7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/cdk-experimental/drag-drop/drop.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,18 @@ $cdk-z-index-drag-preview: 1000;
66
left: 0;
77
z-index: $cdk-z-index-drag-preview;
88
}
9+
10+
.cdk-drag,
11+
.cdk-drag-handle {
12+
touch-action: none;
13+
-webkit-user-drag: none;
14+
-webkit-tap-highlight-color: transparent;
15+
16+
// stylelint-disable material/no-prefixes
17+
// normally we have a mixin for these, but it's in material/core.
18+
-webkit-user-select: none;
19+
-moz-user-select: none;
20+
-ms-user-select: none;
21+
user-select: none;
22+
// stylelint-enable material/no-prefixes
23+
}

0 commit comments

Comments
 (0)