mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix "show recent note" button, closes #3051
This commit is contained in:
		
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,12 +1,12 @@ | |||||||
| { | { | ||||||
|   "name": "trilium", |   "name": "trilium", | ||||||
|   "version": "0.54.0-beta", |   "version": "0.54.2", | ||||||
|   "lockfileVersion": 2, |   "lockfileVersion": 2, | ||||||
|   "requires": true, |   "requires": true, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "": { |     "": { | ||||||
|       "name": "trilium", |       "name": "trilium", | ||||||
|       "version": "0.54.0-beta", |       "version": "0.54.2", | ||||||
|       "hasInstallScript": true, |       "hasInstallScript": true, | ||||||
|       "license": "AGPL-3.0-only", |       "license": "AGPL-3.0-only", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ import noteCreateService from './note_create.js'; | |||||||
| import treeService from './tree.js'; | import treeService from './tree.js'; | ||||||
| import froca from "./froca.js"; | import froca from "./froca.js"; | ||||||
|  |  | ||||||
| // this key needs to have this value so it's hit by the tooltip | // this key needs to have this value, so it's hit by the tooltip | ||||||
| const SELECTED_NOTE_PATH_KEY = "data-note-path"; | const SELECTED_NOTE_PATH_KEY = "data-note-path"; | ||||||
|  |  | ||||||
| const SELECTED_EXTERNAL_LINK_KEY = "data-external-link"; | const SELECTED_EXTERNAL_LINK_KEY = "data-external-link"; | ||||||
| @@ -89,6 +89,11 @@ function showRecentNotes($el) { | |||||||
|     $el.setSelectedNotePath(""); |     $el.setSelectedNotePath(""); | ||||||
|     $el.autocomplete("val", ""); |     $el.autocomplete("val", ""); | ||||||
|     $el.trigger('focus'); |     $el.trigger('focus'); | ||||||
|  |  | ||||||
|  |     // simulate pressing down arrow to trigger autocomplete | ||||||
|  |     const e = $.Event('keydown'); | ||||||
|  |     e.which = 40; // arrow down | ||||||
|  |     $el.trigger(e); | ||||||
| } | } | ||||||
|  |  | ||||||
| function initNoteAutocomplete($el, options) { | function initNoteAutocomplete($el, options) { | ||||||
|   | |||||||
| @@ -63,8 +63,6 @@ export default class EmptyTypeWidget extends TypeWidget { | |||||||
|                 appContext.tabManager.getActiveContext().setNote(suggestion.notePath); |                 appContext.tabManager.getActiveContext().setNote(suggestion.notePath); | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
|         noteAutocompleteService.showRecentNotes(this.$autoComplete); |  | ||||||
|  |  | ||||||
|         this.$workspaceNotes = this.$widget.find('.workspace-notes'); |         this.$workspaceNotes = this.$widget.find('.workspace-notes'); | ||||||
|  |  | ||||||
|         super.doRender(); |         super.doRender(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user