mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	escape should close the recent notes dialog
This commit is contained in:
		@@ -59,9 +59,15 @@ const recentNotes = (function() {
 | 
			
		||||
                event.preventDefault();
 | 
			
		||||
            },
 | 
			
		||||
            close: function (event, ui) {
 | 
			
		||||
                // keep autocomplete open
 | 
			
		||||
                // we're kind of abusing autocomplete to work in a way which it's not designed for
 | 
			
		||||
                $searchInput.autocomplete("search", "")
 | 
			
		||||
                if (event.keyCode === 27) { // escape closes dialog
 | 
			
		||||
                    $searchInput.autocomplete('destroy');
 | 
			
		||||
                    $dialog.dialog('close');
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    // keep autocomplete open
 | 
			
		||||
                    // we're kind of abusing autocomplete to work in a way which it's not designed for
 | 
			
		||||
                    $searchInput.autocomplete("search", "");
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            create: () => $searchInput.autocomplete("search", ""),
 | 
			
		||||
            classes: {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user