Skip to content

Commit

Permalink
fix(module:input): do not set box-sizing when measuring (#7214)
Browse files Browse the repository at this point in the history
close #7203
  • Loading branch information
stingshen committed Feb 16, 2022
1 parent 26006f6 commit 035dc94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions components/input/autosize.spec.ts
Expand Up @@ -219,11 +219,10 @@ describe('autoresize', () => {
encapsulation: ViewEncapsulation.None,
styles: [
`
textarea.cdk-textarea-autosize-measuring {
textarea.nz-textarea-autosize-measuring {
height: auto !important;
overflow: hidden !important;
padding: 2px 0 !important;
box-sizing: content-box !important;
}
`
]
Expand All @@ -237,11 +236,10 @@ export class NzTestInputWithTextAreaAutoSizeStringComponent {
encapsulation: ViewEncapsulation.None,
styles: [
`
textarea.cdk-textarea-autosize-measuring {
textarea.nz-textarea-autosize-measuring {
height: auto !important;
overflow: hidden !important;
padding: 2px 0 !important;
box-sizing: content-box !important;
}
`
]
Expand All @@ -256,11 +254,10 @@ export class NzTestInputWithTextAreaAutoSizeObjectComponent {
encapsulation: ViewEncapsulation.None,
styles: [
`
textarea.cdk-textarea-autosize-measuring {
textarea.nz-textarea-autosize-measuring {
height: auto !important;
overflow: hidden !important;
padding: 2px 0 !important;
box-sizing: content-box !important;
}
`
]
Expand Down
1 change: 0 additions & 1 deletion components/input/style/patch.less
Expand Up @@ -4,7 +4,6 @@ textarea.nz-textarea-autosize-measuring {
// Having 2px top and bottom padding seems to fix a bug where Chrome gets an incorrect
// measurement. We just have to account for it later and subtract it off the final result.
padding: 2px 0 !important;
box-sizing: content-box !important;
}

.@{search-prefix} {
Expand Down

0 comments on commit 035dc94

Please sign in to comment.