Bug: Popover onRequestClose firing immediately after opening with react-dom ^17.0.0
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
- When Popovers are opened, they should stay open until the right event fires the `onRequestClose` handler
## Current Behavior
- When react-dom is at version 17.0.0 or higher, it interferes with the Popover and results in an immediate firing of `onRequestClose` as soon as the Popover is clicked open
## Possible Solution
- This may be related to the Popover's use of `outy` to detect clicks outside of the component
- It seems recent versions of react-dom are disrupting the manner in which these outside clicks are determined
## Context + Screenshots
- When this issue was first discovered, a temporary workaround could be implemented due to the Popover allowing you to pass a custom `onRequestClose` prop
- However, this workaround is just a temporary fix, and it is not possible to implement for calcite-react components that utilize Popover and do not allow the passing of a custom `onRequestClose` prop
Contributor guide
Assessment
This issue has not been assessed yet.