Tracks send state for edited messages

This commit is contained in:
Josh Perez 2023-08-15 19:24:19 -04:00 committed by Jamie Kyle
parent 860bec5534
commit b2319b43d6
8 changed files with 391 additions and 55 deletions

View file

@ -434,12 +434,14 @@ export function CompositionArea({
useEffect(() => {
if (inputApiRef.current) {
inputApiRef.current.focus();
setHasFocus(true);
}
}, []);
// Focus input whenever explicitly requested
useEffect(() => {
if (focusCounter !== previousFocusCounter && inputApiRef.current) {
inputApiRef.current.focus();
setHasFocus(true);
}
}, [inputApiRef, focusCounter, previousFocusCounter]);