mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02: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. (cherry picked from commit 51eb9f18f723112a781b335a1dce22f2b2dd05d4)
This commit is contained in:
parent
a0e4a416cd
commit
5e2077e6ae
@ -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…
x
Reference in New Issue
Block a user