mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Make multiline text fields auto-size depending on the value
This avoids a series of issues on the "Embed" tab, for both the "Wikitext" and the "HTML" snippet. Without this patch, the textareas might show a resize handle that does have weird effects when used. Sometimes the textarea contains very few text and empty space, sometimes a long text that is barely visible. Auto-fitting it to the content feels like the right thing to do here. Change-Id: Ieeaf4d33fef8eb3660fb177f57dfb753b8c208f8
This commit is contained in:
parent
e1caa0f65e
commit
646d871eee
|
@ -119,7 +119,9 @@
|
|||
|
||||
this.embedTextHtml = new OO.ui.MultilineTextInputWidget( {
|
||||
classes: htmlClasses,
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
autosize: true,
|
||||
maxRows: 5
|
||||
} );
|
||||
|
||||
this.embedTextHtml.$element.find( 'textarea' )
|
||||
|
@ -131,7 +133,9 @@
|
|||
|
||||
this.embedTextWikitext = new OO.ui.MultilineTextInputWidget( {
|
||||
classes: wikitextClasses,
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
autosize: true,
|
||||
maxRows: 5
|
||||
} );
|
||||
|
||||
this.embedTextWikitext.$element.find( 'textarea' )
|
||||
|
|
Loading…
Reference in a new issue