diff --git a/ui/desktop/src/components/RichChatInput.tsx b/ui/desktop/src/components/RichChatInput.tsx index cbaa14fd12..e85f24ce33 100644 --- a/ui/desktop/src/components/RichChatInput.tsx +++ b/ui/desktop/src/components/RichChatInput.tsx @@ -1006,6 +1006,12 @@ export const RichChatInput = forwardRef(({ const cleanup = monitorTextareaChanges(); return cleanup; }, [monitorTextareaChanges]); + + // Explicitly sync height whenever value changes (including when text is deleted) + useEffect(() => { + syncDisplayHeight(); + ensureStyleConsistency(); + }, [value, syncDisplayHeight, ensureStyleConsistency]); // Tooltip handlers const handleSuggestionSelect = useCallback((suggestion: string) => { const newValue = value.slice(0, tooltip.wordStart) +