Merge pull request #1673 from TriliumNext/fix_cal

Fix calendar widget doesn't close when click on a note
This commit is contained in:
Elian Doran 2025-04-11 23:50:25 +03:00 committed by GitHub
commit b26e430c3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -138,7 +138,7 @@ export type CommandMappings = {
insertNoteAfter: ContextMenuCommandData;
insertChildNote: ContextMenuCommandData;
delete: ContextMenuCommandData;
editNoteTitle: ContextMenuCommandData;
editNoteTitle: {};
protectSubtree: ContextMenuCommandData;
unprotectSubtree: ContextMenuCommandData;
openBulkActionsDialog:

View File

@ -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);
@ -1683,7 +1686,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
this.triggerCommand("showImportDialog", { noteId: node.data.noteId });
}
editNoteTitleCommand({ node }: CommandListenerData<"editNoteTitle">) {
editNoteTitleCommand() {
appContext.triggerCommand("focusOnTitle");
}