Merge pull request #4464 from primefaces/issue-4269

Textarea autoResize issue
pull/4468/head
Tuğçe Küçükoğlu 2023-09-18 15:21:57 +03:00 committed by GitHub
commit ff09b40e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ export default {
const style = window.getComputedStyle(this.$el);
this.$el.style.height = 'auto';
this.$el.style.height = `calc(${style.borderTopWidth} + ${style.borderBottomWidth} + ${this.$el.scrollHeight}px)`;
this.$el.style.height = this.$el.scrollHeight + 'px';
if (parseFloat(this.$el.style.height) >= parseFloat(this.$el.style.maxHeight)) {
this.$el.style.overflowY = 'scroll';