diff --git a/ts/components/CompositionArea.tsx b/ts/components/CompositionArea.tsx index 47a326f5b..140498399 100644 --- a/ts/components/CompositionArea.tsx +++ b/ts/components/CompositionArea.tsx @@ -317,7 +317,7 @@ export function CompositionArea({ if (inputApiRef.current) { inputApiRef.current.focus(); } - }); + }, []); // Focus input whenever explicitly requested useEffect(() => { if (focusCounter !== previousFocusCounter && inputApiRef.current) { diff --git a/ts/state/ducks/search.ts b/ts/state/ducks/search.ts index a29a97b51..c0939dee2 100644 --- a/ts/state/ducks/search.ts +++ b/ts/state/ducks/search.ts @@ -339,7 +339,10 @@ export function reducer( } if (action.type === 'SEARCH_CLEAR') { - return getEmptyState(); + return { + ...getEmptyState(), + startSearchCounter: state.startSearchCounter, + }; } if (action.type === 'SEARCH_UPDATE') {