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

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

Issue 2197093002: MD Settings: Fix starting height of expanding sections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FixErrors
Patch Set: rebase Created 4 years, 5 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 | « chrome/browser/resources/settings/settings_page/settings_animated_pages.html ('k') | 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/settings_animated_pages.js
diff --git a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
index 34ce3f0c86c37dbb31b2af2096afae3a7f066960..2d6dece8e7f81f043bdb8cce2df144f8e8152832 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -108,10 +108,21 @@ Polymer({
}
}
- if (newRouteIsSubpage && newRoute.section == this.section)
+ if (newRouteIsSubpage && newRoute.section == this.section) {
+ if (!oldRouteIsSubpage) {
+ // Set the height the expand animation should start at before beginning
+ // the transition to the new sub-page.
+ // TODO(michaelpg): Remove MainPageBehavior's dependency on this height
+ // being set.
+ this.style.height = this.clientHeight + 'px';
+ this.async(function() {
+ this.style.height = '';
+ });
+ }
this.$.animatedPages.selected = newRoute.subpage.slice(-1)[0];
- else
+ } else {
this.$.animatedPages.selected = 'main';
+ }
},
/**
« no previous file with comments | « chrome/browser/resources/settings/settings_page/settings_animated_pages.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698