From 3505a48dea36ac6b00bc884950e5b18d3f37c68c Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Mon, 23 Sep 2024 11:30:55 -0400 Subject: [PATCH] fixes #2179 --- docs/pages/resources/changelog.md | 4 ++++ src/components/popup/popup.component.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index 142de763c1..3c98472b0a 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -12,6 +12,10 @@ Components with the Experimental bad New versions of Shoelace are released as-needed and generally occur when a critical mass of changes have accumulated. At any time, you can see what's coming in the next release by visiting [next.shoelace.style](https://next.shoelace.style). +## Next + +- Improved performance of `` by waiting for the active state before spinning up the positioning library [#2179] + ## 2.17.0 - Added the `fixed-scroll-controls` attribute to `` [#2128] diff --git a/src/components/popup/popup.component.ts b/src/components/popup/popup.component.ts index 7fabb4f2f2..abeda890b9 100644 --- a/src/components/popup/popup.component.ts +++ b/src/components/popup/popup.component.ts @@ -264,7 +264,7 @@ export default class SlPopup extends ShoelaceElement { } // If the anchor is valid, start it up - if (this.anchorEl) { + if (this.anchorEl && this.active) { this.start(); } }