Skip to content

Commit 89469ce

Browse files
committed
fix: add animation: none to measurement clone
cloneNode(false) preserves the motionClassName which may include @Keyframes animations. transition: none only stops CSS transitions, not keyframe animations. Without animation: none, the clone could still run keyframe animations that affect getBoundingClientRect().
1 parent 3f8bcf6 commit 89469ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hooks/useAlign.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export default function useAlign(
205205
measureEl.style.overflow = 'hidden';
206206
measureEl.style.transform = 'none';
207207
measureEl.style.transition = 'none';
208+
measureEl.style.animation = 'none';
208209
measureEl.style.visibility = 'hidden';
209210
measureEl.style.pointerEvents = 'none';
210211
popupElement.parentElement?.appendChild(measureEl);

0 commit comments

Comments
 (0)