search immediately when user chooses "full search" from Jump To dialog, #2483

This commit is contained in:
zadam 2022-01-10 20:37:33 +01:00
parent 86fa80f3eb
commit 6f406f9aa2
2 changed files with 5 additions and 1 deletions

View File

@ -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());

View File

@ -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});