From d7ab99013c657e56c5ff209209711b4f4392c7f5 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 9 Sep 2024 23:59:25 +0300 Subject: [PATCH] client: Fix zoom interfering with mind map (closes #387) --- src/public/app/widgets/type_widgets/mind_map.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/app/widgets/type_widgets/mind_map.js b/src/public/app/widgets/type_widgets/mind_map.js index 54aa54537..17429b607 100644 --- a/src/public/app/widgets/type_widgets/mind_map.js +++ b/src/public/app/widgets/type_widgets/mind_map.js @@ -34,6 +34,12 @@ export default class MindMapWidget extends TypeWidget { if (e.key === "F1") { e.stopPropagation(); } + + // Zoom controls + const isCtrl = e.ctrlKey && !e.altKey && !e.metaKey; + if (isCtrl && (e.key == "-" || e.key == "=" || e.key == "0")) { + e.stopPropagation(); + } }); super.doRender();