From 8f15664b889527dbb4b4b3295cd31b1806c710a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Sun, 9 Feb 2025 19:15:46 +0100 Subject: [PATCH] Fixed root bug for start node, fixed ctrl+l --- static/js/node_store.mjs | 2 +- static/js/notes2.mjs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/node_store.mjs b/static/js/node_store.mjs index 43f40f3..e57503e 100644 --- a/static/js/node_store.mjs +++ b/static/js/node_store.mjs @@ -303,7 +303,7 @@ export class NodeStore { .transaction('nodes', 'readonly') .objectStore('nodes') - if (node.ParentUUID === ROOT_NODE) { + if (node.UUID === ROOT_NODE || node.ParentUUID === ROOT_NODE) { resolve(accumulated) return } diff --git a/static/js/notes2.mjs b/static/js/notes2.mjs index 9eb9503..58ce96e 100644 --- a/static/js/notes2.mjs +++ b/static/js/notes2.mjs @@ -234,6 +234,10 @@ class Tree extends Component { const n = this.selectedNode const Space = ' ' + // This handler would otherwise react to stuff like Ctrl+L. + if (event.ctrlKey || event.altKey) + return + switch (event.key) { // Space and enter is toggling expansion. // Holding shift down does it recursively.