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

Change subject: ve.ui.CommentInspector: Simplify autoresizing
......................................................................


ve.ui.CommentInspector: Simplify autoresizing

Ed implemented the 'resize' event on TextInputWidget in aadb8c0bb (T116186).

Change-Id: I3c10d78bef0bf39fbe4aa0d0ae4c25f541cc2c2d
---
M src/ui/inspectors/ve.ui.CommentInspector.js
1 file changed, 1 insertion(+), 14 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/inspectors/ve.ui.CommentInspector.js 
b/src/ui/inspectors/ve.ui.CommentInspector.js
index e7369cc..8e7819a 100644
--- a/src/ui/inspectors/ve.ui.CommentInspector.js
+++ b/src/ui/inspectors/ve.ui.CommentInspector.js
@@ -57,23 +57,10 @@
                multiline: true,
                autosize: true
        } );
-       this.previousTextWidgetHeight = 0;
-
-       this.textWidget.connect( this, { change: 'onTextInputWidgetChange' } );
+       this.textWidget.connect( this, { resize: 'updateSize' } );
 
        this.$content.addClass( 've-ui-commentInspector-content' );
        this.form.$element.append( this.textWidget.$element );
-};
-
-/**
- * Called when the text input widget value has changed.
- */
-ve.ui.CommentInspector.prototype.onTextInputWidgetChange = function () {
-       var height = this.textWidget.$element.height();
-       if ( height !== this.previousTextWidgetHeight ) {
-               this.updateSize();
-               this.previousTextWidgetHeight = height;
-       }
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c10d78bef0bf39fbe4aa0d0ae4c25f541cc2c2d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to