Skip to content

Commit

Permalink
AAE-5122 Change mouse event to leave in tooltip card (#6978)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmartinezga authored May 6, 2021
1 parent f5c29a5 commit 12652b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/core/directives/tooltip-card/tooltip-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import { DomSanitizer } from '@angular/platform-browser';
trigger('tooltip', [
transition(':enter', [
style({ opacity: 0 }),
animate(500, style({ opacity: 1 }))
animate(200, style({ opacity: 1 }))
]),
transition(':leave', [
animate(500, style({ opacity: 0 }))
animate(200, style({ opacity: 0 }))

])
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('TooltipCardDirective', () => {
let tooltipCard = overlay.querySelector<HTMLElement>('div.adf-tooltip-card');
expect(tooltipCard).not.toBeNull();

span.triggerEventHandler('mouseout', {});
span.triggerEventHandler('mouseleave', {});
fixture.detectChanges();
tooltipCard = overlay.querySelector<HTMLElement>('div.adf-tooltip-card');
expect(tooltipCard).toBeNull();
Expand Down
2 changes: 1 addition & 1 deletion lib/core/directives/tooltip-card/tooltip-card.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class TooltipCardDirective implements OnInit, OnDestroy {
tooltipRef.instance.htmlContent = this.htmlContent;
}

@HostListener('mouseout')
@HostListener('mouseleave')
hide() {
this.overlayRef.detach();
}
Expand Down

0 comments on commit 12652b5

Please sign in to comment.