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

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: fix 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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/basic_page_browsertest.js » ('j') | 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 6a02acd2c1b1bec4034f905809b4b105720fb183..96631d9d41912865129829a8419f3574be9399ab 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -42,8 +42,11 @@ var MainPageBehaviorImpl = {
!!oldRoute && !!oldRoute.parent && !!oldRoute.section &&
oldRoute.parent.section != oldRoute.section;
- // Always scroll to the top if navigating from a section to the root route.
- if (oldRouteWasSection && newRoute == settings.Route.BASIC) {
+ // Always scroll to the top if navigating from a section to the root route
+ // or when navigating to the About page.
+ if (this.scroller &&
+ ((oldRouteWasSection && newRoute == settings.Route.BASIC) ||
+ newRoute == settings.Route.ABOUT)) {
this.scroller.scrollTop = 0;
return;
}
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/basic_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698