mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	Triggers full text search when Ctrl + Enter is pressed
This commit is contained in:
		
							parent
							
								
									46823d28e8
								
							
						
					
					
						commit
						e091ef64dd
					
				@ -132,19 +132,6 @@ 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;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user