jenkins-bot has submitted this change and it was merged.

Change subject: Fix text input auto-height calculation
......................................................................


Fix text input auto-height calculation

Use class based unhiding instead of changing the
style attribute.

Follows up Ibf7c99aa4.

Change-Id: I5548b86752eee002c8642cb8069c8a3bdf3c93a6
---
M src/widgets/TextInputWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 91572b8..296880a 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -240,7 +240,7 @@
                        // Set inline height property to 0 to measure scroll 
height
                        .css( 'height', 0 );
 
-               this.$clone[ 0 ].style.display = 'block';
+               this.$clone.removeClass( 'oo-ui-element-hidden' );
 
                this.valCache = this.$input.val();
 
@@ -263,7 +263,7 @@
                measurementError = maxInnerHeight - this.$clone[ 0 
].scrollHeight;
                idealHeight = Math.min( maxInnerHeight, scrollHeight + 
measurementError );
 
-               this.$clone[ 0 ].style.display = 'none';
+               this.$clone.addClass( 'oo-ui-element-hidden' );
 
                // Only apply inline height when expansion beyond natural 
height is needed
                if ( idealHeight > innerHeight ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/189341
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5548b86752eee002c8642cb8069c8a3bdf3c93a6
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to