From a08a3e4b07627ab09be757fa4154bb16898c69ff Mon Sep 17 00:00:00 2001 From: frankiefu Date: Mon, 16 Sep 2013 16:35:14 -0700 Subject: [PATCH] polymer-collapse: better way to check for initial update --- polymer-collapse/polymer-collapse.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polymer-collapse/polymer-collapse.html b/polymer-collapse/polymer-collapse.html index 667c236..fc9515d 100644 --- a/polymer-collapse/polymer-collapse.html +++ b/polymer-collapse/polymer-collapse.html @@ -98,6 +98,9 @@ enteredDocument: function() { this.installControllerStyles(); this.inDocument = true; + this.async(function() { + this.afterInitialUpdate = true; + }); }, leftDocument: function() { this.removeListeners(this.target); @@ -199,7 +202,6 @@ // for initial update, skip the expanding animation to optimize // performance e.g. skip calcSize if (!this.afterInitialUpdate) { - this.afterInitialUpdate = true; this.transitionEnd(); return; } @@ -213,7 +215,6 @@ }); }, hide: function() { - this.afterInitialUpdate = true; // don't need to do anything if it's already hidden if (this.hasClosedClass && !this.fixedSize) { return;