From a2685c6920c54779468dbfdd94c216a81d0626c9 Mon Sep 17 00:00:00 2001 From: Matthew L McPeak Date: Tue, 14 Jul 2026 09:39:12 -0400 Subject: [PATCH] fix: stop Select/Dialog enter animations from transitioning position Root cause: Tailwind's `duration-100` utility sets the literal CSS `transition-duration` property (it's meant for transitions, not animations). Since `transition-property`'s initial value is `all` and nothing overrode it, every element using `duration-100` in its Transition enter/leave-active-class picked up an unintended `transition: all 100ms`. For SelectContent, whose `top`/`left` are set via inline style from usePopoverPosition, this meant the popover's real computed position (set synchronously on mount) got smoothly interpolated from the reactive object's initial {top:0,left:0} default -- visibly flying in from the top-left corner of the viewport before landing in place. Fix: use tw-animate-css's dedicated `animation-duration-*` utility instead, which sets `animation-duration`/`--tw-animation-duration` without ever touching `transition-property`/`transition-duration`. Confirmed via computed-style inspection in headless Chromium that transitionDuration is now 0s while the intended enter/exit keyframe animation still runs for 100ms. Applied everywhere `duration-100` was used for this pattern (DialogContent, DialogOverlay, DialogScrollContent, SelectContent). --- packages/library/src/components/ui/dialog/DialogContent.vue | 4 ++-- packages/library/src/components/ui/dialog/DialogOverlay.vue | 4 ++-- .../library/src/components/ui/dialog/DialogScrollContent.vue | 4 ++-- packages/library/src/components/ui/select/SelectContent.vue | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/library/src/components/ui/dialog/DialogContent.vue b/packages/library/src/components/ui/dialog/DialogContent.vue index 6e824dd..cce7820 100644 --- a/packages/library/src/components/ui/dialog/DialogContent.vue +++ b/packages/library/src/components/ui/dialog/DialogContent.vue @@ -34,8 +34,8 @@ watch(context.open, (value) => { isLocked.value = value }, { immediate: true })
{ isLocked.value = value }, { immediate: true })