mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 18:28:51 +00:00
Merge "Media Dialog: make the alt
field wrap and autosize for longer values"
This commit is contained in:
commit
60b7420e3f
|
@ -230,9 +230,12 @@ ve.ui.MWMediaDialog.prototype.initialize = function () {
|
|||
this.captionFieldset.addItems( [ captionField ] );
|
||||
|
||||
// Alt text
|
||||
this.altTextInput = new OO.ui.TextInputWidget( {
|
||||
this.altTextInput = new OO.ui.MultilineTextInputWidget( {
|
||||
spellcheck: true,
|
||||
classes: [ 've-ui-mwMediaDialog-altText' ]
|
||||
classes: [ 've-ui-mwMediaDialog-altText' ],
|
||||
autosize: true,
|
||||
rows: 1,
|
||||
allowLinebreaks: false
|
||||
} );
|
||||
var altTextField = new OO.ui.FieldLayout( this.altTextInput, {
|
||||
align: 'top'
|
||||
|
@ -1201,6 +1204,9 @@ ve.ui.MWMediaDialog.prototype.switchPanels = function ( panel, noFocus ) {
|
|||
// Focus the caption surface
|
||||
this.captionTarget.focus();
|
||||
}
|
||||
// Auto-sized alt text field is populated while hidden,
|
||||
// so force a manual resize now.
|
||||
this.altTextInput.adjustSize( true );
|
||||
break;
|
||||
case 'search':
|
||||
this.setSize( 'larger' );
|
||||
|
|
Loading…
Reference in a new issue