1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Fixes #7520: Search field doesn't get focus when pressing Ctrl+F (#7529)

This commit is contained in:
Betty Alagwu
2022-12-31 07:54:04 +08:00
committed by GitHub
parent 854f1163cd
commit 5fb01b5c7a
4 changed files with 20 additions and 5 deletions

View File

@ -12,8 +12,11 @@ export const runtime = (comp: any): CommandRuntime => {
if (comp.editorRef.current && comp.editorRef.current.supportsCommand('search')) {
comp.editorRef.current.execCommand({ name: 'search' });
} else {
comp.setShowLocalSearch(true);
if (comp.noteSearchBarRef.current) comp.noteSearchBarRef.current.wrappedInstance.focus();
if (comp.noteSearchBarRef.current) {
comp.noteSearchBarRef.current.focus();
} else {
comp.setShowLocalSearch(true);
}
}
},
enabledCondition: 'oneNoteSelected',