Skip to content

Build your personal knowledge base with Trilium Notes

Add full text search in autocomplete results

SiriusXTf36594efb762
diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js
index 9dd1501f50..6770a38992 100644
--- a/src/public/app/services/note_autocomplete.js
+++ b/src/public/app/services/note_autocomplete.js
@@ -115,12 +115,13 @@ function fullTextSearch($el, options){
const searchString = $el.autocomplete('val');
if (options.fastSearch === false || searchString.trim().length === 0) {
return;
- }
+ }
+ $el.trigger('focus');
options.fastSearch = false;
$el.autocomplete('val', '');
$el.setSelectedNotePath("");
$el.autocomplete('val', searchString);
- $el.trigger('focus');
+ // Set a delay to avoid resetting to true before the full text search is completed.
setTimeout(() => { options.fastSearch = true; }, 100);
}