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

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

Issue 2506793002: MD Settings: Fix Back navigation from section route to BASIC route. (Closed)
Patch Set: removes some excess stuff Created 4 years, 1 month 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 02fbbcc869fbf63d3493b6ec7a63d8b0936c3b25..45f719b7737093136d6c972221d5d84961a1040d 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -30,6 +30,10 @@ var MainPageBehaviorImpl = {
var oldRouteWasSection =
!!oldRoute && !!oldRoute.parent && !!oldRoute.section &&
oldRoute.parent.section != oldRoute.section;
+
+ if (oldRouteWasSection && newRoute == settings.Route.BASIC)
+ this.scroller.scrollTop = 0;
Dan Beam 2016/11/16 02:32:01 do we still want to execute the code that follows
tommycli 2016/11/16 16:39:02 Done. Indeed it does seem that the rest of the cod
+
var scrollToSection =
!settings.lastRouteChangeWasPopstate() || oldRouteWasSection;
« 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