Skip to content

Commit

Permalink
fix(textarea): autogrow (#18822)
Browse files Browse the repository at this point in the history
fixes #18744
  • Loading branch information
manucorporat committed Jul 17, 2019
1 parent 978cc39 commit 26e6d6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/components/textarea/textarea.tsx
Expand Up @@ -193,10 +193,12 @@ export class Textarea implements ComponentInterface {
this.ionInputDidLoad.emit();
}

// TODO: performance hit, this cause layout thrashing
private runAutoGrow() {
const nativeInput = this.nativeInput;
if (nativeInput && this.autoGrow) {
readTask(() => {
nativeInput.style.height = 'inherit';
nativeInput.style.height = nativeInput.scrollHeight + 'px';
});
}
Expand Down

0 comments on commit 26e6d6f

Please sign in to comment.