From 9e89530c8ce3740329830a88f767e2b5ddee214d Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 24 Mar 2020 13:10:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20editor=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=20input=20=E4=BA=8B=E4=BB=B6=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=B8=A4=E6=AC=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/components/editor/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/view/components/editor/index.vue b/src/core/view/components/editor/index.vue index 227c01dc3..0dfe3f9ea 100644 --- a/src/core/view/components/editor/index.vue +++ b/src/core/view/components/editor/index.vue @@ -241,10 +241,14 @@ export default { } const quill = this.quill = new Quill(this.$el, options) const $el = quill.root - const events = ['focus', 'blur'] + const events = ['focus', 'blur', 'input'] events.forEach(name => { $el.addEventListener(name, ($event) => { - this.$trigger(name, $event, this.getContents()) + if (name === 'input') { + $event.stopPropagation() + } else { + this.$trigger(name, $event, this.getContents()) + } }) }) quill.on(Quill.events.TEXT_CHANGE, () => { -- GitLab