mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
Merge pull request #1673 from TriliumNext/fix_cal
Fix calendar widget doesn't close when click on a note
This commit is contained in:
commit
b26e430c3e
@ -138,7 +138,7 @@ export type CommandMappings = {
|
||||
insertNoteAfter: ContextMenuCommandData;
|
||||
insertChildNote: ContextMenuCommandData;
|
||||
delete: ContextMenuCommandData;
|
||||
editNoteTitle: ContextMenuCommandData;
|
||||
editNoteTitle: {};
|
||||
protectSubtree: ContextMenuCommandData;
|
||||
unprotectSubtree: ContextMenuCommandData;
|
||||
openBulkActionsDialog:
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user