Skip to content

Commit 26e6d6f

Browse files
authored
fix(textarea): autogrow (#18822)
fixes #18744
1 parent 978cc39 commit 26e6d6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/components/textarea/textarea.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,12 @@ export class Textarea implements ComponentInterface {
193193
this.ionInputDidLoad.emit();
194194
}
195195

196+
// TODO: performance hit, this cause layout thrashing
196197
private runAutoGrow() {
197198
const nativeInput = this.nativeInput;
198199
if (nativeInput && this.autoGrow) {
199200
readTask(() => {
201+
nativeInput.style.height = 'inherit';
200202
nativeInput.style.height = nativeInput.scrollHeight + 'px';
201203
});
202204
}

0 commit comments

Comments
 (0)