When using MdTooltip in a component which has changeDetection set to ChangeDetectionStrategy.OnPush, mouseOut from the element having tooltip doesn't hides the tooltip.
If we click somewhere else, it hides the tooltip.
When we remove ChangeDetectionStrategy.OnPush, it works normally but we loose the performance benefits.
Are you working on this @andrewseguin I could try and send PR myself, it's extremely annoying, makes tooltips unusable in 90% of my components. I don't want to be stuck on alpha.9 again after waiting over a month on alpha.10..
I am having a similar issue. When my component or any of its parents use
changeDetection: ChangeDetectionStrategy.OnPush
the tooltip doesn't display until the mouse moves off the element, and then quickly disappears. Sometimes it also stays open when it shouldn't.
When I remove the changeDetection: ChangeDetectionStrategy.OnPush from my components up to the root, it starts working normally.
@andrewseguin I see above that some people already implemented a fix for this in their forks.
Does anyone know of any workarounds? I tried hiding manually when the mouse leaves:
<span #tooltip=mdTooltip (mouseleave)="tooltip.hide(); markForCheck()" [mdTooltip]="test"></span>
( markForCheck: this.changeDetectorRef.markForCheck(); )
But it doesn't seem to make any difference.
This has been fixed, please update your version. If the issue persists then please reopen
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Are you working on this @andrewseguin I could try and send PR myself, it's extremely annoying, makes tooltips unusable in 90% of my components. I don't want to be stuck on alpha.9 again after waiting over a month on alpha.10..