mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
MWSaveDialog: Switch to save panel when showing message
Fixing T107251 made it so that clicking "save" always switched back to the save panel momentarily, causing a flicker of "maybe I can edit this" experience. With this change, we can only switch back to the save panel when saving from other panels if a message is being shown. Bug: T156891 Change-Id: I8f67693283e61c39cfce40ee12d5c6788dd97932
This commit is contained in:
parent
7d95edacde
commit
288422cb9e
|
@ -317,6 +317,8 @@ ve.ui.MWSaveDialog.prototype.showMessage = function ( name, message, options ) {
|
|||
progress: this.updateSize.bind( this )
|
||||
} );
|
||||
|
||||
this.swapPanel( 'save' );
|
||||
|
||||
this.messages[ name ] = $message;
|
||||
}
|
||||
};
|
||||
|
@ -626,7 +628,6 @@ ve.ui.MWSaveDialog.prototype.getActionProcess = function ( action ) {
|
|||
return new OO.ui.Process( function () {
|
||||
var saveDeferred = $.Deferred();
|
||||
this.clearMessage( 'keyboard-shortcut-submit' );
|
||||
this.swapPanel( 'save' );
|
||||
this.emit( 'save', saveDeferred );
|
||||
return saveDeferred.promise();
|
||||
}, this );
|
||||
|
|
Loading…
Reference in a new issue