Skip to content

CModal closing if clicked element is removed from dom #361

@ncavallo-dell

Description

@ncavallo-dell

Somewhere along the line CModal's click listener that evaluates if you clicked outside the model or not has changed. It used to be attached to the modal content div but now it's attached to document, meaning it runs after React event handlers.

If you have a modal where elements are removed as they're clicked, to replace with something else, the modal will close prematurely.

Please see my test case here --> stackblitz

  • Windows
  • Edge/Firefox

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions