From 461b268e16f4b9369637da17afba1c814726b58f Mon Sep 17 00:00:00 2001 From: QuarkPixel Date: Thu, 18 Sep 2025 14:51:09 +0800 Subject: fix: missing transition when closing --- src/shadow.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shadow.js b/src/shadow.js index 5435532..fd3c2f3 100644 --- a/src/shadow.js +++ b/src/shadow.js @@ -101,10 +101,12 @@ export default class Shadow { this.isOpen = false; this.element.classList.remove('open'); - this.original.style.visibility = 'visible'; - Animation.resetTransformMatrix(this.element); - setTimeout(() => this.destroyItself(), 300); + // Wait for animation to complete before showing original and destroying shadow + setTimeout(() => { + this.original.style.visibility = 'visible'; + this.destroyItself(); + }, config.transitionDuration); } placeItself() { -- cgit v1.2.3