Skip to content

Commit b026898

Browse files
committed
Revert "Switch to :not approach to prevent text selection on buttons in hovers"
This reverts commit 49050d5.
1 parent 864ce2e commit b026898

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/vs/base/browser/ui/hover/hoverWidget.css

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77
cursor: default;
88
position: absolute;
99
overflow: hidden;
10+
user-select: text;
11+
-webkit-user-select: text;
1012
box-sizing: border-box;
1113
line-height: 1.5em;
1214
white-space: var(--vscode-hover-whiteSpace, normal);
1315
}
1416

15-
/* Enable text selection for all elements except button-like elements */
16-
.monaco-hover :not(.action-container):not(.action):not(button):not(.monaco-button):not(.monaco-text-button):not([role="button"]) {
17-
user-select: text;
18-
-webkit-user-select: text;
19-
}
20-
2117
.monaco-hover.fade-in {
2218
animation: fadein 100ms linear;
2319
}
@@ -211,3 +207,14 @@
211207
opacity: 0.4;
212208
cursor: default;
213209
}
210+
211+
/* Prevent text selection in all button-like elements within hovers */
212+
.monaco-hover .action-container,
213+
.monaco-hover .action,
214+
.monaco-hover button,
215+
.monaco-hover .monaco-button,
216+
.monaco-hover .monaco-text-button,
217+
.monaco-hover [role="button"] {
218+
-webkit-user-select: none;
219+
user-select: none;
220+
}

0 commit comments

Comments
 (0)