mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	search immediately when user chooses "full search" from Jump To dialog, #2483
This commit is contained in:
		| @@ -118,7 +118,7 @@ class AppContext extends Component { | ||||
| const appContext = new AppContext(window.glob.isMainWindow); | ||||
|  | ||||
| // we should save all outstanding changes before the page/app is closed | ||||
| $(window).on('beforeunload', () => {return "SSS"; | ||||
| $(window).on('beforeunload', () => { | ||||
|     let allSaved = true; | ||||
|  | ||||
|     appContext.beforeUnloadListeners = appContext.beforeUnloadListeners.filter(wr => !!wr.deref()); | ||||
|   | ||||
| @@ -5,6 +5,7 @@ import treeService from "../services/tree.js"; | ||||
| import openService from "./open.js"; | ||||
| import protectedSessionService from "./protected_session.js"; | ||||
| import options from "./options.js"; | ||||
| import froca from "./froca.js"; | ||||
|  | ||||
| export default class RootCommandExecutor extends Component { | ||||
|     jumpToNoteCommand() { | ||||
| @@ -72,6 +73,9 @@ export default class RootCommandExecutor extends Component { | ||||
|     async searchNotesCommand({searchString, ancestorNoteId}) { | ||||
|         const searchNote = await dateNoteService.createSearchNote({searchString, ancestorNoteId}); | ||||
|  | ||||
|         // force immediate search | ||||
|         await froca.loadSearchNote(searchNote.noteId); | ||||
|  | ||||
|         const noteContext = await appContext.tabManager.openContextWithNote(searchNote.noteId, true); | ||||
|  | ||||
|         appContext.triggerCommand('focusOnSearchDefinition', {ntxId: noteContext.ntxId}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user