From dfa946fe6efb62067c18217b3114b5daa103aeb1 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 8 Nov 2024 14:54:02 +0100 Subject: [PATCH] fix: set listeners only to editable messages, remove listeners when unmount Signed-off-by: Maksim Sukharev --- .../MessagesGroup/Message/MessagePart/MessageBody.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/MessageBody.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/MessageBody.vue index b3f227008601..72a4e75ac9ae 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/MessageBody.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/MessageBody.vue @@ -422,6 +422,10 @@ export default { this.codeBlocks = Array.from(this.$refs.messageMain?.querySelectorAll('pre')) }, + beforeDestroy() { + EventBus.off('editing-message-processing', this.setIsEditing) + }, + methods: { handleMarkdownMouseOver(event) { if (!this.containsCodeBlocks) {