Summary
The hCaptcha VisualEditor error plugin does not execute hCaptcha when in invisible mode, which is the recommended mode for secure enclave. We should make that work
Background
- In T405585: hCaptcha: Fix secure enclave loading in VisualEditor we made it possible for the hCaptcha VisualEditor plugin to load the secure-api.js code
- However, that task did not include making it possible for the user to submit hCaptcha when using secure enclave
- We will need to consider the UI of how invisible mode works, as secure enclave is recommended to be used in invisible mode only
- However, that task did not include making it possible for the user to submit hCaptcha when using secure enclave
- Making hCaptcha work when we load hCaptcha unconditionally (including execution when in invisible mode) will be handled in subtasks of T406335: hCaptcha VisualEditor plugin: Display hCaptcha before first "Save changes" button press if possible
- This task is only to handle the captcha error handler where hCaptcha is shown because an edit failed due to requiring hCaptcha to be completed
Technical notes
- hCaptcha wasn't working as expected in the VisualEditor plugin, as the hcaptcha.execute call was not doing anything
- We will need to investigate what is going wrong with the code, as it renders correctly but then just does not execute even when hcaptcha.execute is called (essentially the promise that is returned is never completed)
Acceptance criteria
- When using secure enclave, it is possible to save an edit using VisualEditor when hCaptcha appears