1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Fixed regression with local search (could not be closed anymore)

This commit is contained in:
Laurent Cozic 2020-05-06 23:17:03 +01:00
parent e06dd9c69f
commit c273fd4d63

View File

@ -62,8 +62,10 @@ export default function useWindowCommandHandler(dependencies:HookDependencies) {
if (editorRef.current && editorRef.current.supportsCommand('search')) {
editorCmd.name = 'search';
} else {
setShowLocalSearch(true);
if (noteSearchBarRef.current) noteSearchBarRef.current.wrappedInstance.focus();
fn = () => {
setShowLocalSearch(true);
if (noteSearchBarRef.current) noteSearchBarRef.current.wrappedInstance.focus();
};
}
} else if (command.name === 'insertTemplate') {
editorCmd.name = 'insertText',