primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.9k stars 1.05k forks source link

Tooltip event="both" does not work if element get focus state by clicking on it #7260

Closed Luko248 closed 1 month ago

Luko248 commented 1 month ago

Describe the bug

If I se "tab" case, it perfectly fowks for hover or focus, but if I try click on element, tooltip will dissapier, when i leave trigger element with cursor viz picture.

Reproducer

No response

System Information

System: Windows 10, Browsers: all npmPackages: primereact

primereact: 10.8.3
react: 18.2.0

Steps to reproduce the behavior

tooltip

Expected behavior

When user set event="both", it must show tooltip on hover and when user focus input, it must be still visible, if user leave input / whatever with curssor.

sja-cslab commented 1 month ago

@melloware my guess is, that hover-out will trigger the hide event

Luko248 commented 1 month ago

@melloware Yes, I think so. Is it possible to fix it in next release?

sja-cslab commented 1 month ago

@Luko248 you're more than welcome to open a PR

melloware commented 1 month ago

@Luko248 is this a duplicate of #5727 ?

sja-cslab commented 1 month ago

@melloware no its similar but not a dupe. However fixing the one COULD fix the other one too.

The difference is, that on #5727 we're talking about tooltips on two inputs with hover/focus, this issue here is about a single input that has both events set

melloware commented 1 month ago

Understood i will mark this as a bug.