From f942ea168dee0aebbd2b96349a283cb5d82cdfb7 Mon Sep 17 00:00:00 2001 From: nguyenmuoi157 <33494100+nguyenmuoi157@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:10:08 +0700 Subject: [PATCH] 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 <33494100+nguyenmuoi157@users.noreply.github.com> --- src/styles/global.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/styles/global.css b/src/styles/global.css index dbb9e1f4..40eb2703 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -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; }