diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index 01715e071..b7e5b6a45 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -138,7 +138,7 @@ export type CommandMappings = { insertNoteAfter: ContextMenuCommandData; insertChildNote: ContextMenuCommandData; delete: ContextMenuCommandData; - editNoteTitle: ContextMenuCommandData; + editNoteTitle: {}; protectSubtree: ContextMenuCommandData; unprotectSubtree: ContextMenuCommandData; openBulkActionsDialog: diff --git a/src/public/app/widgets/note_tree.ts b/src/public/app/widgets/note_tree.ts index 7fc801ecb..b42b27c83 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); @@ -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"); }