From e0727cc72c9a8daf4abaf8b986bc97c3f9b2748e Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Fri, 19 Aug 2022 14:32:53 -0400 Subject: [PATCH] cleanup when auto-size changes --- src/components/popup/popup.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/popup/popup.ts b/src/components/popup/popup.ts index ca0c1fcf6..1ecc299c7 100644 --- a/src/components/popup/popup.ts +++ b/src/components/popup/popup.ts @@ -330,10 +330,14 @@ export default class SlPopup extends ShoelaceElement { apply: ({ availableWidth, availableHeight }) => { if (this.autoSize === 'vertical' || this.autoSize === 'both') { this.style.setProperty('--auto-size-available-height', `${availableHeight}px`); + } else { + this.style.removeProperty('--auto-size-available-height'); } if (this.autoSize === 'horizontal' || this.autoSize === 'both') { this.style.setProperty('--auto-size-available-width', `${availableWidth}px`); + } else { + this.style.removeProperty('--auto-size-available-width'); } } })