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 82962c8e29
commit 1564a4994a

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;