diff --git a/browser/src/control/Control.MobileWizardWindow.js b/browser/src/control/Control.MobileWizardWindow.js index 0fcdfa957761..e6624a2d9241 100644 --- a/browser/src/control/Control.MobileWizardWindow.js +++ b/browser/src/control/Control.MobileWizardWindow.js @@ -55,6 +55,8 @@ L.Control.MobileWizardWindow = L.Control.extend({ var parentNode = document.getElementById('mobile-wizard-content'); this.content = L.DomUtil.create('div', 'mobile-wizard mobile-wizard-content', parentNode); this.content.id = this.id; + + this.scrollPositions = []; }, onAdd: function (map) { @@ -253,6 +255,8 @@ L.Control.MobileWizardWindow = L.Control.extend({ else $(contentToShow).children('.ui-content').first().show(); + const currentScroll = this.mobileWizard.scrollTop(); + this.scrollPositions.push(currentScroll); this.mobileWizard.scrollTop(0); this._currentDepth++; @@ -325,7 +329,8 @@ L.Control.MobileWizardWindow = L.Control.extend({ $('#mobile-wizard.funcwizard div#mobile-wizard-content').addClass('hideHelpBG'); headers.show('slide', { direction: 'left' }, 'fast'); - this.mobileWizard.scrollTop(0); + const prevScroll = this.scrollPositions.pop(); + this.mobileWizard.scrollTop(prevScroll); if (this._currentDepth == 0 || (this._isTabMode && this._currentDepth == 1)) { this._inMainMenu = true;