From 2cc181d1ac425d1d386f124a60df80d19d10823e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 8 Jul 2025 15:51:19 +0300 Subject: [PATCH] fix(tree): pasting in editor on middle click (closes #5812) --- apps/client/src/widgets/note_tree.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts index 1a9bb5ce6..0b89162ea 100644 --- a/apps/client/src/widgets/note_tree.ts +++ b/apps/client/src/widgets/note_tree.ts @@ -253,6 +253,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { e.preventDefault(); } }); + this.$tree.on("auxclick", (e) => { + // Prevent middle click from pasting in the editor. + e.stopPropagation(); + e.preventDefault(); + }); this.$treeSettingsPopup = this.$widget.find(".tree-settings-popup"); this.$hideArchivedNotesCheckbox = this.$treeSettingsPopup.find(".hide-archived-notes");