mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Media upload: Initialize booklet before setting file on drag drop
Calling initialize will clear all fields including the OO.ui.SelectFileWidget that was just set. Follows up I521909d27c390faad7d62f717f2b97b7676e5a63. Bug: T40031 Change-Id: Ibc7ddafae9cb7718372520245a356938f4731479
This commit is contained in:
parent
e1f9adebfe
commit
d1bf196f68
|
@ -1086,13 +1086,13 @@ ve.ui.MWMediaDialog.prototype.getSetupProcess = function ( data ) {
|
||||||
|
|
||||||
this.switchPanels( this.selectedNode ? 'edit' : 'search' );
|
this.switchPanels( this.selectedNode ? 'edit' : 'search' );
|
||||||
|
|
||||||
|
// Reset upload booklet
|
||||||
|
this.mediaUploadBooklet.initialize();
|
||||||
|
|
||||||
if ( data.file ) {
|
if ( data.file ) {
|
||||||
this.searchTabs.setCard( 'upload' );
|
this.searchTabs.setCard( 'upload' );
|
||||||
this.mediaUploadBooklet.setFile( data.file );
|
this.mediaUploadBooklet.setFile( data.file );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset upload booklet
|
|
||||||
this.mediaUploadBooklet.initialize();
|
|
||||||
}, this );
|
}, this );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue