Skip to content

Build your personal knowledge base with Trilium Notes

fix: 🐛 fix calendar widget doesn't close when click on a note

Jin14a3b2811deb
diff --git a/src/public/app/widgets/note_tree.ts b/src/public/app/widgets/note_tree.ts
index 7fc801ecba..0497e6eb75 100644
--- a/src/public/app/widgets/note_tree.ts
+++ b/src/public/app/widgets/note_tree.ts
@@ -418,6 +418,9 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
// click event won't propagate so let's close context menu manually
contextMenu.hide();
+ // hide all dropdowns, fix calendar widget dropdown doesn't close when click on a note
+ $('.dropdown-menu').parent('.dropdown').find('[data-bs-toggle="dropdown"]').dropdown('hide');
+
this.clearSelectedNodes();
const notePath = treeService.getNotePath(data.node);