From 326816e7b7e156f4004fc642a0245c76c7bf0744 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 23 Aug 2022 09:00:03 -0400 Subject: [PATCH] fixes #867 --- docs/resources/changelog.md | 1 + src/internal/animate.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 540d9ee13..22c064f73 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -18,6 +18,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Fixed a bug in `` where dynamically changing slotted items wouldn't update the tree properly - Fixed a bug in `` that caused the panel to stack when clicking on the divider in mobile versions of Chrome [#862](https://github.com/shoelace-style/shoelace/issues/862) - Fixed a bug in `` that prevented flip fallbacks from working as intended +- Fixed a bug that caused concurrent animations to work incorrectly when the durations were different [#867](https://github.com/shoelace-style/shoelace/issues/867) - Improved single selection in `` so nodes expand and collapse and receive selection when clicking on the label - Renamed `expanded-icon` and `collapsed-icon` slots to `expand-icon` and `collapse-icon` in the experimental `` and `` components - Improved RTL support for `` diff --git a/src/internal/animate.ts b/src/internal/animate.ts index 217957fdf..7d64be963 100644 --- a/src/internal/animate.ts +++ b/src/internal/animate.ts @@ -9,7 +9,8 @@ export function animateTo(el: HTMLElement, keyframes: Keyframe[], options?: Keyf const animation = el.animate(keyframes, { ...options, - duration: prefersReducedMotion() ? 0 : options!.duration + duration: prefersReducedMotion() ? 0 : options!.duration, + fill: 'forwards' }); animation.addEventListener('cancel', resolve, { once: true });