From 0e64c7f4daa0a2e65bd1204b1f3cda728b22f3fb Mon Sep 17 00:00:00 2001 From: Anthony Koerber Date: Thu, 3 Sep 2015 13:48:21 -0500 Subject: [PATCH] Additional conditions for dropdown panel --- src/shared/behaviors/positionable-dropdown.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/behaviors/positionable-dropdown.html b/src/shared/behaviors/positionable-dropdown.html index 45bf208c..c2f799ce 100644 --- a/src/shared/behaviors/positionable-dropdown.html +++ b/src/shared/behaviors/positionable-dropdown.html @@ -68,7 +68,8 @@ if (this.overflow === 'hidden') { panelWidth = targetRect.width + "px"; } else if (this.overflow === 'visible') { - panelWidth = "auto"; + panelRect.width > targetRect.width + panelWidth = (panelRect.width > targetRect.width) ? "auto" : targetRect.width + "px"; } // fitparent & overflowWidth will always trump this.overflow, @@ -79,7 +80,7 @@ panelRect.width = this.$.container.style.width = panelWidth; // if it's an item-recycler, we need to have NO horizontal scrolling - if (this.data) { + if (this.$.itemRecycler) { this.$.itemRecycler.$.constrainer.style.width = panelWidth; this.$.itemRecycler.$.pane.style.overflowY = "auto"; this.$.itemRecycler.$.pane.style.overflowX = "hidden";