Skip to content

Build your personal knowledge base with Trilium Notes

Jump to note dialog: fix duplicate event triggers (#1283)

FliegendeWurst51eb9f18f723
diff --git a/src/public/app/dialogs/jump_to_note.js b/src/public/app/dialogs/jump_to_note.js
index 172c9f2fff..378b6876db 100644
--- a/src/public/app/dialogs/jump_to_note.js
+++ b/src/public/app/dialogs/jump_to_note.js
@@ -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;