From 4ce736b58779ead697bebadd6c96b9f64645be3c Mon Sep 17 00:00:00 2001 From: Leonidas Arvanitis Date: Sat, 19 Sep 2020 23:53:05 +0300 Subject: [PATCH] fix(editor): Restrict selected cell count in this editor instance The menububble should not be hidden when any other editor instance has selected cells, in case there are more editors in the same page. --- src/components/QuasarTiptap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/QuasarTiptap.vue b/src/components/QuasarTiptap.vue index 59d4ca7..582e1a4 100644 --- a/src/components/QuasarTiptap.vue +++ b/src/components/QuasarTiptap.vue @@ -210,7 +210,7 @@ export default { this.$emit('update', { getJSON, getHTML, state, transaction }) }, onTransaction: ({ getJSON, getHTML, state, transaction }) => { - const selectedCellElements = document.querySelectorAll('.selectedCell') + const selectedCellElements = this.editor.view.dom.querySelectorAll('.selectedCell') this.selectedCellSize = selectedCellElements.length this.$emit('transaction', { getJSON, getHTML, state, transaction })