mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-21 10:33:05 +00:00
EditCheck: Close any existing edit check dialog before opening onBeforeSave list
Depends-On: Ib58b05fab39bcdc7d68b84ae235cfff775d7712c Change-Id: I04e6b209935756d6e56d479ec09f341463622acb
This commit is contained in:
parent
e9c7503c72
commit
414e5d29ed
|
@ -156,10 +156,12 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).editCheck || mw.editcheck.ecenable
|
||||||
}
|
}
|
||||||
|
|
||||||
saveProcess.next( () => {
|
saveProcess.next( () => {
|
||||||
|
const windowAction = ve.ui.actionFactory.create( 'window', surface, 'check' );
|
||||||
|
// .always is not chainable
|
||||||
|
return windowAction.close( 'editCheckDialog' ).closed.then( () => {}, () => {} ).then( () => {
|
||||||
toolbar.toggle( false );
|
toolbar.toggle( false );
|
||||||
target.onContainerScroll();
|
target.onContainerScroll();
|
||||||
// surface.executeCommand( 'editCheckDialogBeforeSave' );
|
// surface.executeCommand( 'editCheckDialogBeforeSave' );
|
||||||
const windowAction = ve.ui.actionFactory.create( 'window', surface, 'check' );
|
|
||||||
return windowAction.open( 'editCheckDialog', { listener: 'onBeforeSave', reviewMode: true } )
|
return windowAction.open( 'editCheckDialog', { listener: 'onBeforeSave', reviewMode: true } )
|
||||||
.then( ( instance ) => instance.closing )
|
.then( ( instance ) => instance.closing )
|
||||||
.then( ( data ) => {
|
.then( ( data ) => {
|
||||||
|
@ -193,6 +195,7 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).editCheck || mw.editcheck.ecenable
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
} );
|
||||||
} else {
|
} else {
|
||||||
// Counterpart to earlier preSaveChecksShown, for use in tracking
|
// Counterpart to earlier preSaveChecksShown, for use in tracking
|
||||||
// errors in check-generation:
|
// errors in check-generation:
|
||||||
|
|
Loading…
Reference in a new issue