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

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

Issue 2627403003: MD Settings: Scroll to top when navigating to About page. (Closed)
Patch Set: Created 3 years, 11 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
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 6a02acd2c1b1bec4034f905809b4b105720fb183..b5093385ca99ef583ce066d0db89e0adf0da4875 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -48,6 +48,12 @@ var MainPageBehaviorImpl = {
return;
}
+ // Always scroll to the top when navigating to the About page.
dschuyler 2017/01/17 23:33:38 I'm not sure about this, but WDYT about combining
tommycli 2017/01/17 23:47:00 Done.
+ if (newRoute == settings.Route.ABOUT && this.scroller) {
+ this.scroller.scrollTop = 0;
+ return;
+ }
+
// Scroll to the section except for back/forward. Also scroll for any
// in-page back/forward navigations (from a section or the root page).
var scrollToSection =

Powered by Google App Engine
This is Rietveld 408576698