Skip to content
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

Bug: Popover onRequestClose firing immediately after opening with react-dom ^17.0.0 #469

Open
LeviRemi opened this issue May 7, 2021 · 0 comments
Labels

Comments

@LeviRemi
Copy link
Collaborator

LeviRemi commented May 7, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant