mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Edit check: only count ChecksAvailable after the check for source-mode
Change-Id: I96091963af56a40d94445d7b65eb5c35326d0403
This commit is contained in:
parent
a9c91ac78f
commit
0c91e1795c
|
@ -153,7 +153,6 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).editCheck || mw.editcheck.ecenable
|
|||
let saveProcessDeferred;
|
||||
|
||||
mw.hook( 've.preSaveProcess' ).add( ( saveProcess, target ) => {
|
||||
ve.track( 'counter.editcheck.preSaveChecksAvailable' );
|
||||
const surface = target.getSurface();
|
||||
|
||||
if ( surface.getMode() !== 'visual' ) {
|
||||
|
@ -164,6 +163,8 @@ if ( mw.config.get( 'wgVisualEditorConfig' ).editCheck || mw.editcheck.ecenable
|
|||
return;
|
||||
}
|
||||
|
||||
ve.track( 'counter.editcheck.preSaveChecksAvailable' );
|
||||
|
||||
// clear rejection-reasons between runs of the save process, so only the last one counts
|
||||
mw.editcheck.rejections.length = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue