Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293620

Change subject: Fix FancyCaptcha reload JS
......................................................................

Fix FancyCaptcha reload JS

I0da671a5 broke the FancyCaptcha reload script for the old auth
forms, and didn't get it quite right for AuthManager forms either
(that one mostly works but the textfield is not refocused).
This patch fixes both.

Change-Id: I78300a4f6998e63e71e4516331f4f3408b86864b
---
M FancyCaptcha/resources/ext.confirmEdit.fancyCaptcha.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/20/293620/1

diff --git a/FancyCaptcha/resources/ext.confirmEdit.fancyCaptcha.js 
b/FancyCaptcha/resources/ext.confirmEdit.fancyCaptcha.js
index 2c22d4a..c010db8 100644
--- a/FancyCaptcha/resources/ext.confirmEdit.fancyCaptcha.js
+++ b/FancyCaptcha/resources/ext.confirmEdit.fancyCaptcha.js
@@ -29,7 +29,11 @@
 
                                // replace index key with a new one for hidden 
tag
                                $( '#mw-input-captchaId' ).val( captchaIndex );
-                               $( '#mw-input-wpcaptchaWord' ).val( '' 
).focus();
+                               $( '#mw-input-captchaWord' ).val( '' ).focus();
+
+                               // now do the same with a selector that works 
for pre-1.27 login forms
+                               $root.find( '[name="wpCaptchaId"]' ).val( 
captchaIndex );
+                               $root.find( '[name="wpCaptchaWord"]' ).val( '' 
).focus();
                        }
                } )
                .always( function () {

-- 
To view, visit https://gerrit.wikimedia.org/r/293620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78300a4f6998e63e71e4516331f4f3408b86864b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to