Skip to content

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

@LeviRemi

Description

@LeviRemi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions