Page MenuHomePhabricator

The functionality to restore the edit textarea scroll on preview is not working
Closed, ResolvedPublic

Description

MediaWiki had a functionality that when you edit a page and the edit area has a vertical scroll, when you hit preview, after the page loads again the edit area gets scrolled to the point it was before hitting the preview button.

This is no longer working since a lot of time but I'm missing it.

In fact the code is there. See JavaScript function scrollEditBox in resources/mediawiki.action/mediawiki.action.edit.js [1]

In fact, the edit form has a hidden input field "wpScrolltop" that is being filled correctly when you hit submit, and the server responds back with that field with the same value that it was submitted. Manually executing the function restores the scroll position. So maybe the function isn't being executed at all (maybe a JS error before it? or some other code is changing/interfering with the scroll position of the textarea.


[1] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/mediawiki.action/mediawiki.action.edit.js;hb=HEAD#l135


Version: 1.21.x
Severity: trivial

Details

Reference
bz44803

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:14 AM
bzimport set Reference to bz44803.
bzimport added a subscriber: Unknown Object (MLST).

Note that this happens since at least 1.19, or even before.

I would like to work on this bug.Can someone please assign this to me.

sidharth93singh wrote:

it is working fine now.

I recently made some changes to WikiEditor that also touched or interacted with this: effd98be7ebaa1f6f0d2c5b524c96ed6e0839a32