Fix popover animation causing placement switching loop (#2246)

This commit is contained in:
Matthias Metelka 2022-12-08 13:35:55 +01:00 committed by GitHub
parent fb2dcf1484
commit 8f311f5e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const placementStore = getContext<Writable<Promise<Placement>>>(floatingKey);
/* await computed placement of floating element to determine animation direction */
$: if ($placementStore !== undefined) {
$: if ($placementStore !== undefined && hidden) {
$placementStore.then((computedPlacement) => {
if (placement != computedPlacement) {
placement = computedPlacement;