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

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

Issue 2582643002: MD Settings: Fix scrolling when navigating Forwards from BASIC page. (Closed)
Patch Set: Created 4 years 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 fd15c75f0ae7886d02fbac1ad530f248703ce354..4942ac7f6856e039957e88110b19e3d681a3040f 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -50,7 +50,8 @@ var MainPageBehaviorImpl = {
}
var scrollToSection =
- !settings.lastRouteChangeWasPopstate() || oldRouteWasSection;
+ !settings.lastRouteChangeWasPopstate() || oldRouteWasSection ||
+ oldRoute == settings.Route.BASIC;
Dan Beam 2016/12/16 00:59:59 can you explain why?
tommycli 2016/12/16 20:17:40 Done. Refactored a bit and expanded comment.
// For previously uncreated pages (including on first load), allow the page
// to render before scrolling to or expanding the section.
« 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