mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 08:13:40 +08:00
Merge branch 'sirius_patch_2' of https://github.com/TriliumNext/Notes into sirius_patch_2
This commit is contained in:
commit
616d7117db
@ -132,6 +132,19 @@ function initNoteAutocomplete($el, options) {
|
|||||||
return false;
|
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 = {};
|
let autocompleteOptions = {};
|
||||||
if (options.container) {
|
if (options.container) {
|
||||||
autocompleteOptions.dropdownMenuContainer = options.container;
|
autocompleteOptions.dropdownMenuContainer = options.container;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user