From f0c9f77aac451e43cb1dcfdaeef72cdba663e7fc Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 10 Feb 2026 14:08:10 +1100 Subject: [PATCH] fix height bug --- .../ui/src/components/ExpandingTextArea/index.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/ui/src/components/ExpandingTextArea/index.tsx b/packages/ui/src/components/ExpandingTextArea/index.tsx index 1fee3f7c0e3..48b8755dd1f 100644 --- a/packages/ui/src/components/ExpandingTextArea/index.tsx +++ b/packages/ui/src/components/ExpandingTextArea/index.tsx @@ -22,14 +22,11 @@ const ExpandingTextArea = forwardRef { if (!element) return - // Update the height - if (!value) { - element.style.height = 'auto' - element.style.minHeight = '36px' - } else { - element.style.height = 'auto' - element.style.height = element.scrollHeight + 'px' - } + // Match single-line input height (h-10 = 40px) so we don't shrink when typing; grow only when content wraps + const singleLineHeightPx = 40 + element.style.height = 'auto' + const contentHeight = element.scrollHeight + element.style.height = Math.max(singleLineHeightPx, contentHeight) + 'px' } useLayoutEffect(() => {