diff --git a/packages/@mantine/core/src/components/FloatingIndicator/use-floating-indicator.ts b/packages/@mantine/core/src/components/FloatingIndicator/use-floating-indicator.ts index 55211e9659..22b8fa14c4 100644 --- a/packages/@mantine/core/src/components/FloatingIndicator/use-floating-indicator.ts +++ b/packages/@mantine/core/src/components/FloatingIndicator/use-floating-indicator.ts @@ -108,9 +108,9 @@ export function useFloatingIndicator({ } }; - document.addEventListener('transitionend', handleTransitionEnd); + parent.addEventListener('transitionend', handleTransitionEnd); return () => { - document.removeEventListener('transitionend', handleTransitionEnd); + parent.removeEventListener('transitionend', handleTransitionEnd); }; }