From 89ff0a6e08e0f4e36fe15f06253006480a5c0051 Mon Sep 17 00:00:00 2001 From: Julian Acosta <1844640+IAmJulianAcosta@users.noreply.github.com> Date: Wed, 9 Dec 2020 15:06:06 -0500 Subject: [PATCH] Fix container size calculation The container size is calculated based on its current width and height, but the current child is set to `position: absolute`, before this calculation making it shorter that it should --- addon/components/liquid-container.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addon/components/liquid-container.js b/addon/components/liquid-container.js index 87b90815..c6ea1df6 100644 --- a/addon/components/liquid-container.js +++ b/addon/components/liquid-container.js @@ -80,7 +80,10 @@ export default Component.extend(Growable, { // Measure ourself again to see how big the new children make // us. - let want = measure(elt); + let want = { + width: Math.max(...sizes.map(size => size.width)), + height: Math.max(...sizes.map(size => size.height)), + }; let have = this._cachedSize || want; // Make ourself absolute