mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Fix up mw.libs.ve.EditingTabDialog.prototype.getActionProcess
How did this ever work? Ensure action is passed through and not just undefined, wait for change to go through before refreshing. Bug: T131818 Change-Id: I83b5695906044299d338e62e6c980c596d291765
This commit is contained in:
parent
1ad77ddf91
commit
f67b578c3f
|
@ -71,11 +71,19 @@ mw.libs.ve.EditingTabDialog.prototype.getSetupProcess = function ( action ) {
|
|||
* @inheritdoc
|
||||
*/
|
||||
mw.libs.ve.EditingTabDialog.prototype.getActionProcess = function ( action ) {
|
||||
if ( action ) {
|
||||
var dialog = this,
|
||||
act = action;
|
||||
if ( act ) {
|
||||
return new OO.ui.Process( function () {
|
||||
new mw.Api().saveOption( 'visualeditor-tabs', action );
|
||||
mw.user.options.set( 'visualeditor-tabs', action );
|
||||
this.close( { action: action } );
|
||||
var action = this.getActions().get( { actions: act } )[ 0 ];
|
||||
action.pushPending();
|
||||
dialog.pushPending();
|
||||
|
||||
new mw.Api().saveOption( 'visualeditor-tabs', act ).done( function () {
|
||||
action.popPending();
|
||||
mw.user.options.set( 'visualeditor-tabs', act );
|
||||
dialog.close( { action: act } );
|
||||
} );
|
||||
}, this );
|
||||
} else {
|
||||
// Parent method
|
||||
|
|
Loading…
Reference in a new issue