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

pull/3064/head^2^2
Laurent Cozic 2020-05-06 23:17:03 +01:00
parent e06dd9c69f
commit c273fd4d63
1 changed files with 4 additions and 2 deletions

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',