Skip to content

Commit

Permalink
height
Browse files Browse the repository at this point in the history
  • Loading branch information
loivsen committed Oct 10, 2023
1 parent 31a883f commit 735dc12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/uui-textarea/lib/uui-textarea.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ export class UUITextareaElement extends FormControlMixin(LitElement) {
// Note: Add + 2 because of the border top+bottom 1px each
if (input.scrollHeight + 2 > input.clientHeight) {
input.style.height = input.scrollHeight + 2 + 'px';
} else if (input.scrollHeight + 2 < input.clientHeight) {
input.style.removeProperty('height');
}

// Reset host styles and scroll to where we were
Expand Down

0 comments on commit 735dc12

Please sign in to comment.