question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(TOOLTIP): Tooltip hide animation appears even if show delay not reached

See original GitHub issue

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

13.2.4

Description

When using ShowDelay>0, and the cursor doesn’t stay long enough to display the tooltip, when leaving the trigger element, the tooltip suddently appears and immediately starts the hide fade out animation. Very disturbing when switching between multiple trigger elements (buttons for instance) with tooltips because if you move quickly over them, they all display the tooltip fade out animation

NB: I’m also using “disableTooltipInteractivity=true” to remove the “blocked by tooltip” side effect started from 13.2.5

Reproduction

Steps to reproduce:

  1. Add a tooltip with a showDelay of 2000ms: <span matTooltip="The phantom tooltip" matTooltipShowDelay="2000">hello, i have a tooltip. Move quickly over me</span>
  2. Move the mouse over the span element, and leave before the show delay elapsed

Expected Behavior

The tooltip should’nt be shown at all because the showDelay was not reached

Actual Behavior

The hide animation plays, making the tooltip briefly appearing

Environment

  • Angular: 13.3.0
  • CDK/Material: 13.3.0
  • Browser(s): Chromium 98
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:38
  • Comments:27 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
pzywycommented, Jul 20, 2022

Temporary fix - add this to main style file:
.mat-tooltip-hide { display: none!important; }
It hides animation so tooltip doesn’t appear on mouseleave before showDelay

15reactions
infactocommented, Apr 13, 2022

That’s annoying. Here’s just a demo: demo

<mat-list>
  <mat-list-item *ngFor="let item of items" [matTooltip]="item.name">{{ item.name }}</mat-list-item>
</mat-list>
@NgModule({
  // ...
  providers: [
    {
      provide: MAT_TOOLTIP_DEFAULT_OPTIONS,
      useValue: { showDelay: 500 },
    }
  ]
  // ...
})
export class AppModule {}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Delayed tooltips set to track should reposition when being ...
A possible workaround would be to use a slow, eased animation instead of a delay. That way the tooltip will never be truly...
Read more >
Hide uib-tooltip after a delay while using tooltip-is-open
I have a tooltip on a save button, when the button is disabled (e.g. invalid data is entered), I want to show a...
Read more >
UI Bootstrap - AngularUI
This is why we need to remove empty href attributes from directive templates and as a result styling is not applied correctly. The...
Read more >
Tooltip - Reach UI
Accessible tooltips component for React. ... Keep the content minimal, they are not intended to hide critical content. If you want interactive content, ......
Read more >
Moving the mouse: mouseover/out, mouseenter/leave
The mouseover event occurs when a mouse pointer comes over an element, ... That's normal and just means that the mouse came not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found