-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(tooltip): popup close delay not respected #4597
Conversation
Can you explain what is going on here - how come it is not enough that all of the logic is in the hide function and why move it up to the |
The hide function is called in the disabled and empty content watchers, by-passing the close delay. Maybe they shouldn't? |
@tmcgee123 @wesleycho After looking into this further, I think the original implementation of this feature was wrong. The transitionTimeout should be reserved for allowing the tooltip animation to run before removing the tooltip element from the dom. The tooltip templates use ng-class="{ in: isOpen() }" to add and remove the 'in' class which sets the opacity (0 and .9). The fade class has the opactiy transition with a time of .15s. A close delay should be a different timeout that completes before the transitionTimeout. I'm going to do some more work on this PR and get this working as it should. |
@RobJacobs I agree. Originally in 13.x, the functionality was as you said. But, with the updates that were put through, it looks as though the timeout is no longer completing before the animation starts. |
Under PR #4455 the timeout for the popup close delay was impacted by the evalAsync for setting the isOpen value. Moved the popup close delay timeout to the hideTooltipBind method so the hide method will now get called after the close popup delay. This will also ensure if the show method is called and the close timeout is cancelled, the isOpen property will not get toggled. Closes #4597 Fixes #4567
This PR LGTM - that was a good find that the implementation was incorrect. We really need to port the timeout to use ngAnimate, but that's future work. |
Under PR angular-ui#4455 the timeout for the popup close delay was impacted by the evalAsync for setting the isOpen value. Moved the popup close delay timeout to the hideTooltipBind method so the hide method will now get called after the close popup delay. This will also ensure if the show method is called and the close timeout is cancelled, the isOpen property will not get toggled. Closes angular-ui#4597 Fixes angular-ui#4567
Under PR #4455 the timeout for the popup close delay
was impacted by the evalAsync for setting the isOpen
value. Moved the popup close delay timeout to the
hideTooltipBind method so the hide mehtod will now
get called after the close popup delay. This will
also ensure if the show method is called and the
close timeout is cancelled, the isOpen property
will not get toggled.