Skip to content

Build your personal knowledge base with Trilium Notes

client: Fix zoom interfering with mind map (closes #387)

Elian Dorand7ab99013c65
diff --git a/src/public/app/widgets/type_widgets/mind_map.js b/src/public/app/widgets/type_widgets/mind_map.js
index 54aa545371..17429b6075 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();