From 2b2f4fbc07faad928dbf202361cd827eb7fd2bb7 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 15 Jul 2023 09:48:30 +0200 Subject: [PATCH] comment --- src/public/app/widgets/note_tree.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 4e1b40f45..3db180b76 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -353,7 +353,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { } }, beforeActivate: (event, {node}) => { - // hidden subtree is hidden hackily, prevent activating it, e.g. by keyboard + // hidden subtree is hidden hackily - we want it to be present in the tree so that we can switch to it + // without reloading the whole tree, but we want it to be hidden when hoisted to root. FancyTree allows + // filtering the display only by ascendant - i.e. if the root is visible, all the descendants are as well. + // We solve it by hiding the hidden subtree via CSS (class "hidden-node-is-hidden"), + // but then we need to prevent activating it, e.g. by keyboard if (hoistedNoteService.getHoistedNoteId() === '_hidden') { // if we're hoisted in hidden subtree, we want to avoid crossing to "visible" tree,