From e091ef64dd15753b946e46feab9e6ab52fb2613b Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Sun, 17 Nov 2024 12:17:11 +0800 Subject: [PATCH] Triggers full text search when Ctrl + Enter is pressed --- src/public/app/services/note_autocomplete.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js index 5932e6177..52f0c2bc3 100644 --- a/src/public/app/services/note_autocomplete.js +++ b/src/public/app/services/note_autocomplete.js @@ -131,19 +131,6 @@ function initNoteAutocomplete($el, options) { // this is important because otherwise input will lose focus immediately and not show the results 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) {