Page MenuHomePhabricator

hCaptcha: Disable submit button after initial button press
Closed, ResolvedPublic

Description

Summary

The submit button on the account creation form and the wikitext editor (for edits) is not disabled after a user presses submit. For slow connections, this means that multiple clicks on the button invoke hcaptcha.execute() multiple times.

Acceptance criteria

  • Submit button on account creation form and wikitext editor is disabled until hcaptcha.execute() finishes

Event Timeline

sguebo_WMF changed the task status from Open to In Progress.Oct 30 2025, 3:27 AM
sguebo_WMF claimed this task.

Change #1199928 had a related patch set uploaded (by Samuel (WMF); author: Samuel (WMF)):

[mediawiki/extensions/ConfirmEdit@master] Disable hCaptcha submit buttons during execution

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

hector.arroyo subscribed.

There's a patch already being worked and the task is In Progress on the WE4.2 board, so moving this to In Progress in the PSI Sprint board.

Change #1199928 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] hCaptcha: Disable submit buttons during execution

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

@sguebo_WMF I find that the submit button is not disabled when action=submit (I am testing by making an edit, switching to VE and then switching back).

@sguebo_WMF After an error, the submit button does not respond anymore. I don't know if this is related to this work. I did this by changing the data-sitekey attribute of the div.h-captcha element and triggering the hcaptcha challenge.

I see the submit button is disabled when attempting to publish an edit. I am unable to submit the form multiple times, either with mouse or keyboard.

After the hCaptcha challenge is closed (either by user interaction or timing out) the submit button is enabled again.

@sguebo_WMF I find that the submit button is not disabled when action=submit (I am testing by making an edit, switching to VE and then switching back).

This appears to have been fixed by changes made in T408693.

@sguebo_WMF After an error, the submit button does not respond anymore. I don't know if this is related to this work. I did this by changing the data-sitekey attribute of the div.h-captcha element and triggering the hcaptcha challenge.

I have raised this separately as T409911.