Skip to content

Commit

Permalink
Merge branch 'sirius_patch_2' of https://github.com/TriliumNext/Notes
Browse files Browse the repository at this point in the history
…into sirius_patch_2
  • Loading branch information
SiriusXT committed Nov 17, 2024
2 parents 4e10071 + db79f23 commit 616d711
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/public/app/services/note_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@ function initNoteAutocomplete($el, options) {
return false;
});

// Triggers full text search when Ctrl + Enter is pressed.
$el.on('keydown', (event) => {
if (event.key === 'Enter') {
if (event.ctrlKey) {
// Prevent Ctrl + Enter from triggering autoComplete.
event.preventDefault();
event.stopImmediatePropagation();
const searchString = $el.val();
appContext.triggerCommand('searchNotes', { searchString });
}
}
});

let autocompleteOptions = {};
if (options.container) {
autocompleteOptions.dropdownMenuContainer = options.container;
Expand Down

0 comments on commit 616d711

Please sign in to comment.