You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking the button outputs clicked in the console for me.
The expected behavior
This did not happen in the react versions prior to 17, so I assume it has to do something with how events are now bubbling to document events. If I add e.stopPropagation() in my button click handler, the document click event listener is not triggered.
The text was updated successfully, but these errors were encountered:
It doesn't look like this bug report has enough info for one of us to reproduce it. With the code provided I don't see a difference between 16 and 17.
Though it does look similar to #20074. Maybe this is the same issue?
Please provide a CodeSandbox (https://material-ui.com/r/issue-template), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
Yeah you're right. I use react-transition-group in the component too, which is what the issue is related to it seems, because after removing the usage, everything works as expected.
React version: 17.0.1
Steps To Reproduce
I have a hook, that binds a
click
event listener on document after some state changes, e.g.:The current behavior
Clicking the button outputs
clicked
in the console for me.The expected behavior
This did not happen in the react versions prior to 17, so I assume it has to do something with how events are now bubbling to document events. If I add
e.stopPropagation()
in my button click handler, the document click event listener is not triggered.The text was updated successfully, but these errors were encountered: