React-tooltip: Styles not applied for short when reloading page

Created on 27 Apr 2020  路  1Comment  路  Source: wwayne/react-tooltip

We use react-tooltip in our project and updated lately from 3.4.0 to newest version, however since v3.5.0 we see that when ever we refresh the page, the tooltip text (which is supposed to be hidden if not clicked) is shown for a short time on page (without any style and with version 3.11.0 even with black background color) and then disappears after like 3 seconds.

Did anyone else have such problem?

Most helpful comment

Just encountered this. Don't know if you ever found a fix, but I added the following to my global stylesheet:

.__react_component_tooltip {
  position: fixed;
  opacity: 0 !important;

  &.show {
    opacity: 1 !important;
  }
}

And it seems to have fixed the issue. I think the styles get loaded in when the component is mounted, so it causes a FOUC.

>All comments

Just encountered this. Don't know if you ever found a fix, but I added the following to my global stylesheet:

.__react_component_tooltip {
  position: fixed;
  opacity: 0 !important;

  &.show {
    opacity: 1 !important;
  }
}

And it seems to have fixed the issue. I think the styles get loaded in when the component is mounted, so it causes a FOUC.

Was this page helpful?
0 / 5 - 0 ratings