Don't restore scroll position when doing real section editing (NWE)

Bug: T152946
Change-Id: I969a8edd4f23bbe6c73855aac059df732102c560
This commit is contained in:
Ed Sanders 2016-12-13 15:44:54 +00:00
parent c4dacd9d24
commit d2ea716902

View file

@ -1155,7 +1155,12 @@ ve.init.mw.DesktopArticleTarget.prototype.getSaveDialogOpeningData = function ()
* Remember the window's scroll position.
*/
ve.init.mw.DesktopArticleTarget.prototype.saveScrollPosition = function () {
this.scrollTop = $( window ).scrollTop();
if ( this.getDefaultMode() === 'source' && this.section !== null ) {
// Reset scroll to top if doing real section editing
this.scrollTop = 0;
} else {
this.scrollTop = $( window ).scrollTop();
}
};
/**