Page MenuHomePhabricator

MobileFrontend's source editor allows to click on the back button while the edit is being saved
Closed, ResolvedPublic1 Estimated Story Points

Description

Summary

While debugging the hCaptcha integration with the MobileFrontend, we found out that it is possible to click on the back button while an edit is being saved.

This error is now more evident because loading the hCaptcha challenge adds more load time, so the user has more time to click on the back button. However, the error is in the pe-existing logic from the MobileFrontend and the fix is to be implemented on that extension.

Acceptance Criteria

  • The source editor does not allow to click on the back button while the edit is being saved
  • The source editor does not allow to click on the back button while an hCaptcha is loading

Event Timeline

Change #1278437 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/MobileFrontend@master] SourceEditor: Disable submit and back buttons while submitting edits

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

hector.arroyo changed the task status from Open to In Progress.Apr 28 2026, 12:54 PM
hector.arroyo updated the task description. (Show Details)
hector.arroyo set the point value for this task to 1.

Yesterday EoD I asked in Editing-team's Slack channel if they are ok with the approach we are following in https://gerrit.wikimedia.org/r/c/1278437 and I'm now waiting for a response.

Change #1278437 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] SourceEditor: Disable submit and back buttons while submitting edits

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

dom_walden subscribed.

I see the back button is disabled while hCaptcha is loading. On testwiki and locally.

Editing as a user with skipcaptcha rights, I immediately go to the second page where you see the preview before it publishes, so it is too quick to check whether it is disabled.