From e509edfe0aaf349cc3f961b808cf287c79827f87 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 14 Jan 2020 04:34:44 +0100 Subject: [PATCH] fix pending event handlers --- src/plugins/cursor-plugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/cursor-plugin.js b/src/plugins/cursor-plugin.js index c895519a..112b4026 100644 --- a/src/plugins/cursor-plugin.js +++ b/src/plugins/cursor-plugin.js @@ -96,7 +96,9 @@ export const yCursorPlugin = awareness => new Plugin({ view: view => { const awarenessListener = () => { setTimeout(() => { - view.dispatch(view.state.tr.setMeta(yCursorPluginKey, { awarenessUpdated: true })) + if (view.docView) { + view.dispatch(view.state.tr.setMeta(yCursorPluginKey, { awarenessUpdated: true })) + } }) } const updateCursorInfo = () => {