On my app I have a menu that worked fine until I upgraded react and react-dom.
After upgrading react and react-dom from version 16.14.0 to version 17.0.0- on menu click, the menu flashes-it opens and closes right away.
Current Behavior 😯
On menu click- the menu opens and closes right away, for some reason the ClickAwayListener is being fired.
Expected Behavior 🤔
On menu click- the menu should open, on click away it should close.
Steps to Reproduce 🕹
Steps:
- Upgrade
react and react-dom to v17.0.0
- Click the menu
Codesandbox:
https://codesandbox.io/s/material-ui-issue-forked-byfgm?file=/src/index.js Invalid. New repro: https://codesandbox.io/s/material-ui-issue-forked-13053?file=/src/Demo.js
Your Environment 🌎
| Tech |
Version |
| Material-UI/core |
v4.11.0 |
| React |
v17.0.0 |
| React-dom |
v17.0.0 |
| Chrome |
v86.0.4240.75 |
On my app I have a menu that worked fine until I upgraded
reactandreact-dom.After upgrading
reactandreact-domfrom version16.14.0to version17.0.0- on menu click, the menu flashes-it opens and closes right away.Current Behavior 😯
On menu click- the menu opens and closes right away, for some reason the
ClickAwayListeneris being fired.Expected Behavior 🤔
On menu click- the menu should open, on click away it should close.
Steps to Reproduce 🕹
Steps:
reactandreact-domto v17.0.0Codesandbox:
https://codesandbox.io/s/material-ui-issue-forked-byfgm?file=/src/index.jsInvalid. New repro: https://codesandbox.io/s/material-ui-issue-forked-13053?file=/src/Demo.jsYour Environment 🌎