Skip to content

Commit 3663053

Browse files
author
a.klapper
committed
Added not null check for editables when setting readOnly
1 parent 51a072d commit 3663053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/assets/editors/ckeditor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class CKEditorEditor extends StringEditor {
141141
enable () {
142142
if(!this.always_disabled) {
143143
this.input.disabled = false;
144-
if(this.instance) {
144+
if(this.instance && this.instance.editable()) {
145145
this.instance.setReadOnly(false);
146146
}
147147
super.enable();
@@ -151,7 +151,7 @@ class CKEditorEditor extends StringEditor {
151151
disable (always_disabled) {
152152
if(always_disabled) this.always_disabled = true;
153153
this.input.disabled = true;
154-
if(this.instance) {
154+
if(this.instance && this.instance.editable()) {
155155
this.instance.setReadOnly(true);
156156
}
157157
super.disable();

0 commit comments

Comments
 (0)