Skip to content

Exit stages of transition on modal don't seem to run #971

@jarcoal

Description

@jarcoal

Describe the bug

When providing a transition in the Modal component, the exit stages of the transition don't seem to run when show is set to false after being true.

Reproducible Example

Here is a full reproduction: https://codesandbox.io/s/react-modal-transition-issue-5j4sz

You can inspect element on the modal to see that it never gets the ...-exit-active classes from CSSTransition.

Expected behavior

I would expect the exit classes to be applied, but the modal seems to unmount from the DOM instantly, not giving them a chance to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions