Don't wrap unknown actions with confirmation

For example, the "apply changes" button was producing a confirmation
dialog.

Bug: T300095
Change-Id: I77e53cc0cf62ff7c0aca052568384e20490ce7ec
This commit is contained in:
Adam Wight 2022-01-26 14:40:58 +01:00
parent e4cd36b471
commit 7e7ad97bf6

View file

@ -439,7 +439,7 @@ ve.ui.MWTransclusionDialog.prototype.getActionProcess = function ( action ) {
return new OO.ui.Process( function () {
this.toggleSidebar( !this.isSidebarExpanded );
}, this );
default:
case '':
// close action
if ( willLoseProgress ) {
return new OO.ui.Process( function () {
@ -447,10 +447,9 @@ ve.ui.MWTransclusionDialog.prototype.getActionProcess = function ( action ) {
'visualeditor-dialog-transclusion-close-confirmation-prompt',
this.close.bind( this ) );
}, this );
} else {
return ve.ui.MWTransclusionDialog.super.prototype.getActionProcess.call( this, action );
}
}
return ve.ui.MWTransclusionDialog.super.prototype.getActionProcess.call( this, action );
};
/**