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:
Prateek Saxena 2015-10-14 15:14:17 +05:30 committed by Bartosz Dziewoński
parent e1f9adebfe
commit d1bf196f68

View file

@ -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 );
}; };