@@ -48612,7 +48612,7 @@ CUI.Input = (function(superClass) {
4861248612 this.__input.style.setProperty("--textarea-min-rows", this._min_rows);
4861348613 resize = (function(_this) {
4861448614 return function() {
48615- var measureValue, neededRows, originalHeight, originalOverflow, originalValue;
48615+ var contentHeight, measureValue, neededRows, originalHeight, originalOverflow, originalValue;
4861648616 if (!_this.__lineHeight) {
4861748617 return;
4861848618 }
@@ -48628,7 +48628,8 @@ CUI.Input = (function(superClass) {
4862848628 _this.__input.style.overflow = "hidden";
4862948629 _this.__input.rows = 1;
4863048630 _this.__input.value = measureValue;
48631- neededRows = Math.max(_this._min_rows, Math.ceil(_this.__input.scrollHeight / _this.__lineHeight));
48631+ contentHeight = _this.__input.scrollHeight - (_this.__verticalPadding || 0);
48632+ neededRows = Math.max(_this._min_rows, Math.ceil(contentHeight / _this.__lineHeight));
4863248633 _this.__input.rows = neededRows;
4863348634 _this.__input.value = originalValue;
4863448635 _this.__input.style.height = originalHeight;
@@ -48648,10 +48649,13 @@ CUI.Input = (function(superClass) {
4864848649 node: this.__input
4864948650 }).done((function(_this) {
4865048651 return function() {
48652+ var style;
4865148653 if (_this.isDestroyed()) {
4865248654 return;
4865348655 }
48654- _this.__lineHeight = parseInt(CUI.dom.getComputedStyle(_this.__input).lineHeight, 10);
48656+ style = CUI.dom.getComputedStyle(_this.__input);
48657+ _this.__lineHeight = parseInt(style.lineHeight, 10);
48658+ _this.__verticalPadding = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
4865548659 return resize();
4865648660 };
4865748661 })(this));
0 commit comments