mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 12:08:03 +08:00
Jump to note dialog: fix duplicate event triggers (#1283)
This fixes an issue where the current path (above the note tree) displays parts multiple times, e.g. A / A / B / B instead of A / B. The same issue could also affect other event handlers, but I didn't look around the codebase further.
This commit is contained in:
parent
4b8ca31091
commit
51eb9f18f7
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,8 @@ export async function showDialog() {
|
|||
utils.openDialog($dialog);
|
||||
|
||||
noteAutocompleteService.initNoteAutocomplete($autoComplete, { hideGoToSelectedNoteButton: true })
|
||||
// clear any event listener added in previous invocation of this function
|
||||
.off('autocomplete:noteselected')
|
||||
.on('autocomplete:noteselected', function(event, suggestion, dataset) {
|
||||
if (!suggestion.notePath) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue