Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/275684
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(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/84/275684/1
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: newchange
Gerrit-Change-Id: I3c10d78bef0bf39fbe4aa0d0ae4c25f541cc2c2d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits