Bsitu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/96636


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/36/96636/1

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: newchange
Gerrit-Change-Id: Ib8d569359486b455ed2ef0dae9b6eacfd349d09a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>

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

Reply via email to