diff --git a/packages/codehike/src/utils/token-transitions.tsx b/packages/codehike/src/utils/token-transitions.tsx index 2eff3080..77a93653 100644 --- a/packages/codehike/src/utils/token-transitions.tsx +++ b/packages/codehike/src/utils/token-transitions.tsx @@ -241,6 +241,7 @@ function toSnapshotElement(el: HTMLElement): SnapshotElement { y += p.offsetTop p = p.offsetParent } + el?.getAnimations().forEach((a) => a.cancel()) const style = window.getComputedStyle(el) const color = style.color const content = el.textContent