fix(editor): allow text selection and input in editable elements (#1209)

The workbench sets user-select: none on body and nothing restored it for editable elements, so a contenteditable such as CodeMirror's .cm-content inherited it. In WebKit a contenteditable with user-select: none cannot hold a selection, so typing, paste and drag-and-drop into the editor could be dropped. input, textarea and [contenteditable="true"] now get user-select: text next to the cursor: text rule they share; the selection lock still overrides it.

Co-authored-by: nguyenmuoi157 <[email protected]>
Цей коміт міститься в:
nguyenmuoi157 authored and GitHub committed 2026-11-04 23:10:08 +08:00
1 джерело 59f1a1e6db
коміт f942ea168d
1 file changed
+2
+2
Переглянути файл
@@ -41,6 +41,8 @@ html[data-selection-lock] *:not([data-selection-scope], [data-selection-scope] *
input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"]),
textarea,
[contenteditable="true"] {
-webkit-user-select: text;
user-select: text;
cursor: text;
}