Page MenuHomePhabricator

Disable submit on no-JS or when JS is not yet loaded if HCaptcha is required for editing
Closed, DeclinedPublic

Description

See T422222: Unable to submit edit in Basic mode for background

  • If user do not have JS enabled "Publish" button should be disabled and a message shown saying JavaScript is required for publishing (T405589 partly did it, but I here propose "Publish" button should be disabled)
  • If user have JS enabled "Publish" button should be disabled until JS is loaded (to prevent user from submitting forms without Captcha)

This is a different version of T405487: hCaptcha has no indication that JavaScript is required/T405589: hCaptcha: Implement message for no JS users, just about editing instead of account creation.

Event Timeline

I'm not a big fan of the content flash that appears, as the button is disabled for me for only a very short time but long enough to appear as a flash on the page.

So I'd propose we decline this task, as if the user submits their edit with JS enabled but before JS was loaded they will see a error message as shown below:

Screenshot from 2026-04-09 17-08-21.png (1,560×254 px, 65 KB)

if the user submits their edit with JS enabled but before JS was loaded they will see a error message as shown below

Note many users have slow internet connection or that with high latency.

Change #1284685 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/ConfirmEdit@master] hCaptcha: Disable Publish button until JS loads in secure enclave mode

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

After discussion on slack we've decided that this would not be good from a UX point of view.