Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6355)

Unified Diff: chrome/browser/resources/settings/settings_page/main_page_behavior.js

Issue 2777013006: MD Settings: Prevent erroneous scroll when navigating subpage->subpage. (Closed)
Patch Set: address comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_page/main_page_behavior.js
diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.js b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
index 600499e704e72bcd590b9649e15e087b4fd2290b..c38ae43f347c89c58264a6cac18b83c697aeb6f6 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -290,10 +290,12 @@ var MainPageBehaviorImpl = {
this.getSection(settings.getCurrentRoute().section);
// Scroll to the new section or the original position.
- if (newSection && !settings.lastRouteChangeWasPopstate())
+ if (newSection && !settings.lastRouteChangeWasPopstate() &&
+ !settings.getCurrentRoute().isSubpage()) {
newSection.scrollIntoView();
- else
+ } else {
this.scroller.scrollTop = this.origScrollTop_;
+ }
this.currentAnimation_ = section.animateCollapse(
/** @type {!HTMLElement} */(this.scroller));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698