From 09870e1f4527d7e474b38c8b0c4db5c155d883e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 3 Sep 2018 23:27:45 +0200 Subject: [PATCH] do not emit update event in doc is unchanged --- packages/tiptap/src/components/editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tiptap/src/components/editor.js b/packages/tiptap/src/components/editor.js index 461aa0ba..4846af63 100644 --- a/packages/tiptap/src/components/editor.js +++ b/packages/tiptap/src/components/editor.js @@ -204,6 +204,10 @@ export default { }, dispatchTransaction(transaction) { + if (!transaction.docChanged) { + return + } + this.state = this.state.apply(transaction) this.view.updateState(this.state) this.$emit('update', {