From c24f23b871f5a1ed7342ce85e54fe5290595656e Mon Sep 17 00:00:00 2001 From: waseemkhan Date: Sun, 30 Nov 2025 18:51:15 +0500 Subject: [PATCH] Bugfix: Long output content causes full page scroll instead of box scroll. --- client/src/components/ui/textarea.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsx index aeaddd09..b5596a19 100644 --- a/client/src/components/ui/textarea.tsx +++ b/client/src/components/ui/textarea.tsx @@ -19,6 +19,7 @@ export interface TextAreaProps { readOnly?: boolean; autoFocus?: boolean; rows?: number; + maxHeight?: string; placeholder?: string; id?: string; minHeight?: string; @@ -27,7 +28,14 @@ export interface TextAreaProps { } const TextArea = React.forwardRef( - ({ className, value, onChange, theme = "light", ...props }) => { + ({ + className, + value, + onChange, + theme = "light", + maxHeight = "500px", + ...props + }) => { const baseClassName = cn( "w-full rounded-md border border-input bg-background text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", @@ -245,6 +253,7 @@ const TextArea = React.forwardRef( if (onChange) onChange(createSyntheticChangeEvent(val)); }} minHeight={props.minHeight} + maxHeight={maxHeight} lang={props.lang} placeholder={props.placeholder} readOnly={props.readOnly}