Skip to content

Commit 3091a34

Browse files
committed
Fix disabling of textarea on readOnly=nocursor
Closes codemirror#4760
1 parent ff2e8dd commit 3091a34

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/edit/options.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ export function defineOptions(CodeMirror) {
125125
if (val == "nocursor") {
126126
onBlur(cm)
127127
cm.display.input.blur()
128-
cm.display.disabled = true
129-
} else {
130-
cm.display.disabled = false
131128
}
132129
cm.display.input.readOnlyChanged(val)
133130
})

src/input/TextareaInput.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ export default class TextareaInput {
354354

355355
readOnlyChanged(val) {
356356
if (!val) this.reset()
357+
this.textarea.disabled = val == "nocursor"
357358
}
358359

359360
setUneditable() {}

0 commit comments

Comments
 (0)