mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-07 00:07:29 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user