jenkins-bot has submitted this change and it was merged.
Change subject: Textarea should auto-expand to content height during initial
load
......................................................................
Textarea should auto-expand to content height during initial load
Bug: 57275
Change-Id: Ib8d569359486b455ed2ef0dae9b6eacfd349d09a
---
M modules/editor/editors/ext.flow.editors.none.js
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/editor/editors/ext.flow.editors.none.js
b/modules/editor/editors/ext.flow.editors.none.js
index b9b30e6..6ca9875 100644
--- a/modules/editor/editors/ext.flow.editors.none.js
+++ b/modules/editor/editors/ext.flow.editors.none.js
@@ -12,9 +12,12 @@
this.$node.css( 'overflow', 'hidden' );
this.$node.css( 'resize', 'none' );
+ this.$node.height( this.$node.prop( 'scrollHeight' ) );
// auto-expansion shouldn't shrink too much; set default height
as min
this.$node.css( 'min-height', this.$node.outerHeight() );
this.$node.keyup( this.autoExpand );
+ this.$node.focus();
+ this.$node[0].setSelectionRange( 0, 0 );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/96636
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8d569359486b455ed2ef0dae9b6eacfd349d09a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits