Skip to content

[Popover] Overlay still in DOM if updated while exiting #2245

@tmlayton

Description

@tmlayton

Issue summary

#2209 fixed an issue that was causing a 200ms delay before a popover would appear to open. In that PR, during componentDidUpdate, timeouts are cleared before setting new timeouts so the animation wouldn’t flicker to an incorrect state (e.g. triggers the open animation during close or the other way around).

Although if a componentDidUpdate is fired while the popover is closing, the timeout which is responsible for removing the overlay from the DOM gets cleared. This causes to overlay to fade from opacity 1 to 0, but remain in the DOM.

Reduced test case

https://codesandbox.io/s/staging-tree-pso6t

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