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

Desktop: Fixes #5850: Editor loses cursor focus when Ctrl+F search is closed (#5919)

This commit is contained in:
Kenichi Kobayashi
2021-12-28 19:26:33 +09:00
committed by GitHub
parent 46438a5888
commit b98e64c881
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import { useState, useCallback } from 'react';
import Logger from '@joplin/lib/Logger';
import { SearchMarkers } from './useSearchMarkers';
const CommandService = require('@joplin/lib/services/CommandService').default;
const logger = Logger.create('useNoteSearchBar');
@ -70,6 +71,7 @@ export default function useNoteSearchBar() {
const onClose = useCallback(() => {
setShowLocalSearch(false);
setLocalSearch(defaultLocalSearch());
void CommandService.instance().execute('focusElementNoteBody');
}, []);
const setResultCount = useCallback((count: number) => {