File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/react-core/src/components/TextArea Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,15 @@ class TextAreaBase extends Component<TextAreaProps> {
6262 const parent = field . parentElement ;
6363 parent . style . setProperty ( 'height' , 'inherit' ) ;
6464 const computed = window . getComputedStyle ( field ) ;
65+ const parentComputed = window . getComputedStyle ( parent ) ;
6566 // Calculate the height
6667 const height =
6768 parseInt ( computed . getPropertyValue ( 'border-top-width' ) ) +
68- parseInt ( computed . getPropertyValue ( 'padding-top' ) ) +
6969 field . scrollHeight +
70- parseInt ( computed . getPropertyValue ( 'padding-bottom' ) ) +
71- parseInt ( computed . getPropertyValue ( 'border-bottom-width' ) ) ;
70+ parseInt ( computed . getPropertyValue ( 'border-bottom-width' ) ) +
71+ parseInt ( parentComputed . getPropertyValue ( 'padding-top' ) ) +
72+ parseInt ( parentComputed . getPropertyValue ( 'padding-bottom' ) ) ;
73+
7274 parent . style . setProperty ( 'height' , `${ height } px` ) ;
7375 } ;
7476
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ exports[`Matches the snapshot 1`] = `
44<DocumentFragment >
55 <span
66 class = " pf-v6-c-form-control pf-m-textarea pf-m-resize-both pf-m-disabled custom class"
7- style = " height: 6px ;"
7+ style = " height: inherit ;"
88 >
99 <textarea
1010 aria-invalid = " false"
You can’t perform that action at this time.
0 commit comments