-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button: Tooltip remains displayed after button is disabled #3692
Comments
I need to check for changes in Tooltip.js. It breaks some situations in layouts. |
Thanks! By switching from Mount Effect + Update Effect to just a single React.useEffect reduces the amount of registered listeners. Show and Hide events were being registered twice on all components and this is due to the fact the functions being added are anonymous. See MDN: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
If you go to the current showcase and Inspect the button with a tooltip registered you will see this... |
I reverted the tooltip change and opened a new ticket: #3701 |
Describe the bug
Button with showOnDisabled="false" leaves tooltip permanently displayed when disabling the button.
Reproducer
https://codesandbox.io/s/goofy-merkle-u5hbhs?file=/src/demo/TooltipDemo.js
PrimeReact version
8.7.2
React version
17.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
Tooltip should disappear when disabling the button.
The text was updated successfully, but these errors were encountered: