1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fix bug where editor would scroll to focus global search (#3787)

This commit is contained in:
Caleb John 2020-09-22 06:12:22 -06:00 committed by GitHub
parent 5226f0019b
commit 7202066c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,8 @@ export default function useEditorSearch(CodeMirror: any) {
// We only want to highlight all matches when there is only 1 search term
if (keywords.length !== 1 || keywords[0].value == '') {
clearOverlay(this);
setPreviousKeywordValue('');
const prev = keywords.length > 1 ? keywords[0].value : '';
setPreviousKeywordValue(prev);
return 0;
}