Commit a502b3b5 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Do not expand settings at startup

In Polymer 2, shouldExpandSettings_ is called when the computed property
shouldShowMoreSettings_ is undefined, and returns true in this case,
resulting in a flash of the expanded settings. Return false unless
shouldShowMoreSettings_ is set to the boolean value of false.

Bug: 898100
Change-Id: I7154772921c59ba24ba1c80901da4b962305eeac
Reviewed-on: https://chromium-review.googlesource.com/c/1297605Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602494}
parent 6a28458c
......@@ -635,6 +635,11 @@ Polymer({
* @private
*/
shouldExpandSettings_: function() {
if (this.settingsExpandedByUser_ === undefined ||
this.shouldShowMoreSettings_ === undefined) {
return false;
}
// Expand the settings if the user has requested them expanded or if more
// settings is not displayed (i.e. less than 6 total settings available).
return this.settingsExpandedByUser_ || !this.shouldShowMoreSettings_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment