Page MenuHomePhabricator

[Regression] Edit Check becomes unresponsive when clicked on back button after reaching the last check on the stack and scrolling back up to the top of the page
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to this page: https://en.wikipedia.beta.wmcloud.org/wiki/Fox?veaction=edit&ecenable=2
  2. Add a new paragraph anywhere on the page.
  3. Add some content from an external website somewhere that's not at the top of the page.
  4. Click on Publish Changes button.
  5. Observe that in the Pre-Save stage there are three checks now.
  6. Click the down arrow to reach the end of the stack of checks.
  7. Now scroll back up to the top of the page.
  8. Click on the "Back" button to go back to the edit mode.

Observed Result:

Nothing happens, it gets stuck in that stage, there are some errors in the console. "TypeError: Cannot read properties of undefined (reading 'getHighlightSelections')"

Screenshot/Screen capture:

Screenshot 2025-09-15 at 2.42.04 PM.png (2×3 px, 1 MB)

Browser: Chrome

Environment: beta cluster

Event Timeline

Observe that in the Pre-Save stage there are three checks now.

I only see one check. Can you provide more details here?

I can reproduce it, but it's not actually about leaving pre-save, it's really a side-effect of an error that happens when you enter pre-save without a focused action. Arguably, this could get folded in as a QA failure for T404069 which caused it.

Change #1188471 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Edit check dialog: reset currentOffset when reusing the dialog

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

Change #1188471 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check dialog: reset currentOffset when reusing the dialog

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

Observe that in the Pre-Save stage there are three checks now.

I only see one check. Can you provide more details here?

There are supposed to be three checks, not one if you used ecenable=2 :
Reference Check for Step 2
Paste Check and Reference check for Step 3.

Screenshot 2025-09-15 at 6.44.21 PM.png (1×2 px, 517 KB)

Change #1218321 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Edit check dialog: reset "acting" when reusing the dialog

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

Change #1218321 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check dialog: reset "acting" when reusing the dialog

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