mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 08:13:40 +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;
|
insertNoteAfter: ContextMenuCommandData;
|
||||||
insertChildNote: ContextMenuCommandData;
|
insertChildNote: ContextMenuCommandData;
|
||||||
delete: ContextMenuCommandData;
|
delete: ContextMenuCommandData;
|
||||||
editNoteTitle: ContextMenuCommandData;
|
editNoteTitle: {};
|
||||||
protectSubtree: ContextMenuCommandData;
|
protectSubtree: ContextMenuCommandData;
|
||||||
unprotectSubtree: ContextMenuCommandData;
|
unprotectSubtree: ContextMenuCommandData;
|
||||||
openBulkActionsDialog:
|
openBulkActionsDialog:
|
||||||
|
@ -418,6 +418,9 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
// click event won't propagate so let's close context menu manually
|
// click event won't propagate so let's close context menu manually
|
||||||
contextMenu.hide();
|
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();
|
this.clearSelectedNodes();
|
||||||
|
|
||||||
const notePath = treeService.getNotePath(data.node);
|
const notePath = treeService.getNotePath(data.node);
|
||||||
@ -1683,7 +1686,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
this.triggerCommand("showImportDialog", { noteId: node.data.noteId });
|
this.triggerCommand("showImportDialog", { noteId: node.data.noteId });
|
||||||
}
|
}
|
||||||
|
|
||||||
editNoteTitleCommand({ node }: CommandListenerData<"editNoteTitle">) {
|
editNoteTitleCommand() {
|
||||||
appContext.triggerCommand("focusOnTitle");
|
appContext.triggerCommand("focusOnTitle");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user