Skip to content

Commit e18f956

Browse files
committed
resolve --rt-transition-show-delay closer to toolip
Changing `--rt-transition-show-delay` anywhere except in head or on body were not be picked up by show/hide timeouts causing out animations to be skipped entirely by removing the tooltip from the DOM. this change evaluates the variable on the tooltip its self so that the property can be honored lower in the tree.
1 parent 9faf2c6 commit e18f956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ const Tooltip = ({
236236
/**
237237
* see `onTransitionEnd` on tooltip wrapper
238238
*/
239-
const style = getComputedStyle(document.body)
239+
const style = getComputedStyle(tooltipRef.current || document.body)
240240
const transitionShowDelay = cssTimeToMs(style.getPropertyValue('--rt-transition-show-delay'))
241241
missedTransitionTimerRef.current = setTimeout(() => {
242242
/**

0 commit comments

Comments
 (0)