提交 61f36a23 编写于 作者: B Benjamin Pasero

fix #83602

上级 c7ae5872
......@@ -37,6 +37,7 @@ body {
overflow: hidden;
font-size: 11px;
user-select: none;
-webkit-user-select: none;
}
body.web {
......
......@@ -10,6 +10,7 @@ import { iconForeground, foreground, selectionBackground, focusBorder, scrollbar
import { WORKBENCH_BACKGROUND, TITLE_BAR_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
import { isWeb } from 'vs/base/common/platform';
import { createMetaElement } from 'vs/base/browser/dom';
import { isSafari } from 'vs/base/browser/browser';
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
......@@ -168,4 +169,16 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
metaElement.content = titleBackground.toString();
}
}
// We disable user select on the root element, however on Safari this seems
// to prevent any text selection in the monaco editor. As a workaround we
// allow to select text in monaco editor instances.
if (isSafari) {
collector.addRule(`
.monaco-workbench .monaco-editor .view-lines {
user-select: text;
-webkit-user-select: text;
}
`);
}
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册