Keep sending CAPTCHA info if an unrelated save error happens

Bug: T371041
Change-Id: Id18095d830f6b78770a4f9167268d9717352e7e4
This commit is contained in:
Bartosz Dziewoński 2024-08-27 23:08:01 +02:00
parent c6b0bdfb34
commit 6e4fd9cff7

View file

@ -49,11 +49,6 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
target.saveFields.wpCaptchaWord = function () {
return captchaInput.getCaptchaWord();
};
// Unregister extra fields on save attempt
target.saveDialog.once( 'save', () => {
delete target.saveFields.wpCaptchaId;
delete target.saveFields.wpCaptchaWord;
} );
// ProcessDialog's error system isn't great for this yet.
target.saveDialog.clearMessage( 'api-save-error' );