mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
Turnstile's response field uses a static name instead of IDs
The script was originally looking for the field by ID. This resulted in an infinite challenge loop when saving edits through the VisualEditor. This bug stopped our [wiki.gg] rollout of Turnstile over the network last week, so upstreaming this fix in case someone else needs it. Bug: T361098 Change-Id: I0354a33d0d1af988c8788ad2bb021c585384b038
This commit is contained in:
parent
b17f585275
commit
92bcb7f2a2
|
@ -41,7 +41,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
|||
// Register extra fields
|
||||
target.saveFields.wpCaptchaWord = function () {
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
return $( '#cf-turnstile-response' ).val();
|
||||
return $( 'input[ name="cf-turnstile-response" ]' ).val();
|
||||
};
|
||||
|
||||
this.getReadyPromise()
|
||||
|
|
Loading…
Reference in a new issue