react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

React 18: Tooltips still not hiding

Open ansgarsteinkamp opened this issue 3 years ago • 31 comments
trafficstars

With npm's latest version of react-tooltip (version 4.2.21) tooltips still don't hide.

ansgarsteinkamp avatar May 05 '22 11:05 ansgarsteinkamp

As a quick fix you can do this until the package is updated:

const [tooltip, showTooltip] = useState(true);

<>
 {tooltip && <ReactTooltip effect="solid" />}
 <p
   data-tip="hello world"
   onMouseEnter={() => showTooltip(true)}
   onMouseLeave={() => {
     showTooltip(false);
     setTimeout(() => showTooltip(true), 50);
   }}
 />
</>

svmszcck avatar May 05 '22 23:05 svmszcck

Thank you very much for the quick fix! Hoping for a package-update, though, since there are hundreds of tooltips in my project.

ansgarsteinkamp avatar May 06 '22 08:05 ansgarsteinkamp

Is there a PR that fixes this issue? Can this quick fix be turned into a PR?

aronhelser avatar May 06 '22 14:05 aronhelser

Correct me if I'm wrong, but commit 064249c solved the React 18 problem, didn't it? It's just not part of the npm-package 4.2.21. The quick fix of svmszcck is really just a quick fix. Not very quick in my case, though.

ansgarsteinkamp avatar May 06 '22 14:05 ansgarsteinkamp

The last tag (and therefore npm release) was almost a year ago... @aronhelser do you have the permissions to push tags and make a new npm release?

Roundaround avatar May 06 '22 22:05 Roundaround

Seconded on an NPM-update, there's been a lot of bug-fixes over the past year that should be deployed for them to have any value.

PanRagon avatar May 10 '22 09:05 PanRagon

npm was supposed to be automated, and I no longer remember how to do it. If I get a chance I'll look into it...

aronhelser avatar May 10 '22 15:05 aronhelser

Any luck with the NPM update?

Kaishley avatar May 19 '22 09:05 Kaishley

This seems to be an issue with the new Strict mode of React. I was having the same issue even in production but it worked fine after I removed Strict Mode from my app. As a temporary solution until new update rolls out for the package on NPM

lalit-sh avatar Jun 02 '22 11:06 lalit-sh

@aronhelser Another month has passed, no update on NPM. Is there really nobody who can update the NPM-package based on the fixed issues of the past 12 months? The project is stone-dead, isn't it?

ansgarsteinkamp avatar Jun 09 '22 08:06 ansgarsteinkamp

Neither of the maintainers are currently working with React. I've been working exclusively in C++ for the past year. I would be happy to give maintainer access to someone willing to work on the project.

aronhelser avatar Jun 09 '22 11:06 aronhelser

@aronhelser I'd be happy to try and help as an active maintainer (with the spare time I can find for it). Been using this library for quite some time.

alexgurr avatar Jun 18 '22 06:06 alexgurr

@wwayne if we'd like to add @alexgurr as a maintainer, I think you would need to do it. WDYT?

aronhelser avatar Jun 19 '22 18:06 aronhelser

@wwayne kind reminder

Kaishley avatar Jul 13 '22 13:07 Kaishley

@wwayne gentle nudge

d4mr avatar Aug 01 '22 16:08 d4mr

npm was supposed to be automated, and I no longer remember how to do it. If I get a chance I'll look into it...

@aronhelser yarn run semantic-release --publish --ci false ?

pdeszynski avatar Aug 03 '22 06:08 pdeszynski

Hello everybody! What is known about the update?

present-g avatar Aug 04 '22 10:08 present-g

@roggervalf is this something you could do?

poeck avatar Aug 24 '22 01:08 poeck

Do we have any solution for that? I am experiencing the same issue in production.

sundarrajendran avatar Sep 30 '22 05:09 sundarrajendran

@sundarrajendran temporarily, until issue is resolved here, you can replace it with a fork of mine https://www.npmjs.com/package/react-tooltip-rc

pdeszynski avatar Sep 30 '22 06:09 pdeszynski

@pdeszynski I would like to point to your package as a maintained version of this package in the readme - is this OK with you? Are you able to help with maintaining the project? I am probably going to mark this project as archived/inactive.

aronhelser avatar Sep 30 '22 19:09 aronhelser

@alexgurr I know you were interested in possibly being maintainer. Maybe you can coordinate with @pdeszynski ?

aronhelser avatar Sep 30 '22 19:09 aronhelser

@pdeszynski I would like to point to your package as a maintained version of this package in the readme - is this OK with you? Are you able to help with maintaining the project? I am probably going to mark this project as archived/inactive.

@aronhelser I don't mind, though if you would like to point to a GH repository - then i would suggest to use https://github.com/react-tooltip/react-tooltip so that does not change anymore no matter who the maintainer will be.

pdeszynski avatar Oct 02 '22 11:10 pdeszynski

hey @pdeszynski i'm trying to install your library but it's not working. i'm installing it correctly but in node_modules/react-tooltip-rc/dist there's a tar.gz file instead of index.js. i'm currently using normal react-tooltip, but i'm having the problem when the tooltip is not closing on mouse leave, so i'm hoping your fork fixes this.

elionntechguy avatar Oct 03 '22 04:10 elionntechguy

@elionntechguy sorry for that 😞 I was playing with github actions to setup builds and I didn't think anyone really uses it yet. Released fixed version with files inside and from now on I promise it will be stable

Zrzut ekranu 2022-10-3 o 08 00 35

pdeszynski avatar Oct 03 '22 06:10 pdeszynski

@pdeszynski thanks, but i'm still having the problem of the tooltip not closing when you go off it with clickable=true property. Would you be able to help me?

elionntechguy avatar Oct 05 '22 09:10 elionntechguy

@elionntechguy sorry for that 😞 I was playing with github actions to setup builds and I didn't think anyone really uses it yet. Released fixed version with files inside and from now on I promise it will be stable

Zrzut ekranu 2022-10-3 o 08 00 35

@pdeszynski thanks, but i'm still having the problem of the tooltip not closing when you go off it with clickable=true property. Would you be able to help me?

pinging again @pdeszynski

elionntechguy avatar Oct 05 '22 19:10 elionntechguy

Is the issue fixed now...part of npm-package 4.2.21?

@pdeszynski thanks, but i'm still having the problem of the tooltip not closing when you go off it with clickable=true property. Would you be able to help me?

Please open an issue, though I was not able to reproduce that problem https://pdeszynski.github.io/react-tooltip/?path=/story/example-advanced-features--all-props&args=effect:solid;clickable:true

pdeszynski avatar Oct 07 '22 08:10 pdeszynski

Yep, still having the issue, setting "strict mode" to false on Next.js seems to do the trick, but is a bit awkward!

Hope it gets fixed soon, anyway, thanks for the work!

DarioLopes avatar Oct 07 '22 20:10 DarioLopes