mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
small fixes
This commit is contained in:
@@ -371,7 +371,15 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
},
|
||||
beforeActivate: (event, data) => {
|
||||
// hidden subtree is hidden hackily, prevent activating it e.g. by keyboard
|
||||
return hoistedNoteService.getHoistedNoteId() === '_hidden' || data.node.data.noteId !== '_hidden';
|
||||
|
||||
if (hoistedNoteService.getHoistedNoteId() === '_hidden') {
|
||||
// if we're hoisted in hidden subtree, we want to avoid crossing to "visible" tree,
|
||||
// which could happen via UP key from hidden root (to another top level note)
|
||||
return data.node.data.noteId === '_hidden' || data.node.getParent().data.noteId !== 'root';
|
||||
}
|
||||
|
||||
// we're not hoisted to hidden subtree, the only way to cross is via DOWN key to the hidden root
|
||||
return data.node.data.noteId !== '_hidden';
|
||||
},
|
||||
activate: async (event, data) => {
|
||||
// click event won't propagate so let's close context menu manually
|
||||
|
||||
Reference in New Issue
Block a user