Skip to content

Commit d6c6147

Browse files
CookieeQuinnxiaoqing linalexdima
authored
Fix issue microsoft#212484: caretRangeFromPoint was not working when invoked over text which used user-select: none. (microsoft#219819)
Co-authored-by: xiaoqing lin <[email protected]> Co-authored-by: Alexandru Dima <[email protected]>
1 parent b31d6e5 commit d6c6147

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/vs/editor/browser/config/editorConfiguration.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,13 @@ function digitCount(n: number): number {
229229

230230
function getExtraEditorClassName(): string {
231231
let extra = '';
232-
if (!browser.isSafari && !browser.isWebkitWebView) {
233-
// Use user-select: none in all browsers except Safari and native macOS WebView
234-
extra += 'no-user-select ';
235-
}
236-
if (browser.isSafari) {
232+
if (browser.isSafari || browser.isWebkitWebView) {
237233
// See https://github.com/microsoft/vscode/issues/108822
238234
extra += 'no-minimap-shadow ';
239235
extra += 'enable-user-select ';
236+
} else {
237+
// Use user-select: none in all browsers except Safari and native macOS WebView
238+
extra += 'no-user-select ';
240239
}
241240
if (platform.isMacintosh) {
242241
extra += 'mac ';

0 commit comments

Comments
 (0)