Page MenuHomePhabricator

RTP- reloads at the bottom of the page
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Login to https://en.wikipedia.beta.wmflabs.org
  2. Go to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Barack_Obama_Editable&action=edit
  3. Make an edit to the page (but don't save)
  4. Wait at least 5 seconds or however long it takes to have the edit on the RTP side
  5. Reload the page

What happens?:
Once you make an edit on the page and it shows up on the RTP, refresh it, during the reload it goes to the bottom of the article

What should have happened instead?:
During reload it should go to the top of the article.

Other information (browser name/version, screenshots, etc.):
Environment: Beta
OS: macOS Ventura 13.5
Browser: Chrome 116
Device: MBA M2

QA Results - Beta

Event Timeline

I think this is a Edit Recovery bug.

The idea with TextSelection.setContents is that the caret position is restored, but when we're inserting the recovered contents the field likely doesn't have focus and so it doesn't have any before-state to restore it to.

Change 957849 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Edit Recovery: reset textarea caret position to top

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

Change 957849 merged by jenkins-bot:

[mediawiki/core@master] Edit Recovery: reset textarea caret position to top

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

@Samwilson After you reload the article does appear at the top of the page now as seen in the gif. I will move this to Done. Thanks for all your work!

Status: โœ… PASS
Environment: Beta
OS: macOS Ventura
Browser: Chrome 116
Device: MBA M2
Emulated Device:: N/A
Test Links:
https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Barack_Obama_Editable&action=edit

โœ…AC1: https://phabricator.wikimedia.org/T346370

2023-09-19_11-01-01.mp4.gif (1ร—1 px, 3 MB)