mlaursen / react-md

React material design - An accessible React component library built from the Material Design guidelines in Sass
https://react-md.dev
MIT License
2.34k stars 303 forks source link

Tooltip still visible and stuck when transitioning to previous page #1419

Open tuhlmann opened 1 year ago

tuhlmann commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

We use react-md 5.1.3

In our app we use tooltips like this:

<HoverModeProvider defaultVisibleInTime={200}>
  <Tooltipped id="weight-low" dense tooltip="Can (Low Priority)">
    <div>...</div>
  </Tooltipped>
</HoverModeProvider>

The HoverModeProvider is part of the component. Displaying the tooltips works just as it should. The problem occurs when I leave the page while the tooltip is still visible- on a Mac I can for instance do this by triggering the "browser back" with "CMD+Left".

In this case the tooltip remains on the previous page or any page loaded afterwards and will not go away. The only way to get rid of it is to CMD+R reload the page.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Have some way to make the tooltip disappear.

Screenshots If applicable, add screenshots to help explain your problem.

The page where the tooltip should appear:

2022-07-23_15-10-32

Tooltip stuck on page, even though I went back to previous page:

2022-07-23_15-09-54

Desktop (please complete the following information):