mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-12 00:06:24 +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
Bug: T368852
Change-Id: I0354a33d0d1af988c8788ad2bb021c585384b038
(cherry picked from commit 92bcb7f2a2
)
This commit is contained in:
parent
c52cc04a3f
commit
317d472e8a
|
@ -41,7 +41,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
// Register extra fields
|
// Register extra fields
|
||||||
target.saveFields.wpCaptchaWord = function () {
|
target.saveFields.wpCaptchaWord = function () {
|
||||||
// eslint-disable-next-line no-jquery/no-global-selector
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
return $( '#cf-turnstile-response' ).val();
|
return $( 'input[ name="cf-turnstile-response" ]' ).val();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getReadyPromise()
|
this.getReadyPromise()
|
||||||
|
|
Loading…
Reference in a new issue