Skip to content

Commit 46da8ed

Browse files
author
Chris
committed
modifying enabled state before pasting html to prevent auto-focusing editors on load
1 parent 68d0d79 commit 46da8ed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dist/vue-quill-editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/editor.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@
7878
7979
// Instance
8080
this.quill = new Quill(this.$refs.editor, this._options)
81+
82+
this.quill.enable(false)
8183
8284
// Set editor content
8385
if (this.value || this.content) {
8486
this.quill.pasteHTML(this.value || this.content)
8587
}
8688
8789
// Disabled editor
88-
if (this.disabled) {
89-
this.quill.enable(false)
90+
if (!this.disabled) {
91+
this.quill.enable(true)
9092
}
9193
9294
// Mark model as touched if editor lost focus

0 commit comments

Comments
 (0)