mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Don't restore scroll position when doing real section editing (NWE)
Bug: T152946 Change-Id: I969a8edd4f23bbe6c73855aac059df732102c560
This commit is contained in:
parent
c4dacd9d24
commit
d2ea716902
|
@ -1155,7 +1155,12 @@ ve.init.mw.DesktopArticleTarget.prototype.getSaveDialogOpeningData = function ()
|
|||
* Remember the window's scroll position.
|
||||
*/
|
||||
ve.init.mw.DesktopArticleTarget.prototype.saveScrollPosition = function () {
|
||||
if ( this.getDefaultMode() === 'source' && this.section !== null ) {
|
||||
// Reset scroll to top if doing real section editing
|
||||
this.scrollTop = 0;
|
||||
} else {
|
||||
this.scrollTop = $( window ).scrollTop();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue