Skip to content

Click on underlay closes multiple modals #88

@wwahammy

Description

@wwahammy

When underlayClickExits is true, clicking on the underlay around a modal will close the modal. This works perfectly when there's a single modal.

On the other hand, this works a little unexpectedly when there are multiple modals. In that case, if you have a modal and create a second modal and they both have underlayClickExits set to true, one would expect only the second modal to close when you click the underlay. If you click the underlay though in an area outside of both modals, then BOTH modals will close. I don't think this is the expected behavior.

Ideally, I think the modals should know when they're NOT the top most modal and add that being the top most modal as a condition in the checkUnderlayClick function.

I don't know if such a change would be backwards compatible but it's a feature I would find useful.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions