File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ export const TextAreaMixin = (superClass) =>
235
235
parseFloat ( inputStyle . paddingBottom ) +
236
236
parseFloat ( inputStyle . marginTop ) +
237
237
parseFloat ( inputStyle . marginBottom ) +
238
+ parseFloat ( inputFieldStyle . borderTopWidth ) +
239
+ parseFloat ( inputFieldStyle . borderBottomWidth ) +
238
240
parseFloat ( inputFieldStyle . paddingTop ) +
239
241
parseFloat ( inputFieldStyle . paddingBottom ) ;
240
242
const maxHeight = Math . ceil ( contentHeight + marginsAndPaddings ) ;
Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ describe('text-area', () => {
363
363
expect ( textArea . clientHeight ) . to . equal ( lineHeight * 4 ) ;
364
364
} ) ;
365
365
366
- it ( 'should include margins and paddings when calculating max-height' , async ( ) => {
366
+ it ( 'should include margins, paddings and borders when calculating max-height' , async ( ) => {
367
367
const native = textArea . querySelector ( 'textarea' ) ;
368
368
const inputContainer = textArea . shadowRoot . querySelector ( '[part="input-field"]' ) ;
369
369
native . style . paddingTop = '5px' ;
@@ -372,12 +372,14 @@ describe('text-area', () => {
372
372
native . style . marginBottom = '20px' ;
373
373
inputContainer . style . paddingTop = '25px' ;
374
374
inputContainer . style . paddingBottom = '30px' ;
375
+ inputContainer . style . borderTop = 'solid 35px' ;
376
+ inputContainer . style . borderBottom = 'solid 40px' ;
375
377
376
378
textArea . maxRows = 4 ;
377
379
textArea . value = Array ( 400 ) . join ( '400' ) ;
378
380
await nextUpdate ( textArea ) ;
379
381
380
- expect ( textArea . clientHeight ) . to . equal ( lineHeight * 4 + 5 + 10 + 15 + 20 + 25 + 30 ) ;
382
+ expect ( textArea . clientHeight ) . to . equal ( lineHeight * 4 + 5 + 10 + 15 + 20 + 25 + 30 + 35 + 40 ) ;
381
383
} ) ;
382
384
383
385
it ( 'should shrink below max-height defined by maximum rows' , async ( ) => {
You can’t perform that action at this time.
0 commit comments