Skip to content

Overlay backdrop animation not triggered when detaching #8570

Closed
@agent306

Description

@agent306

Bug, feature request, or proposal:

[x] bug report

What is the expected behavior?

Transition animations (vanilla css / Angular) triggered for when Overlay backdrop leaves the DOM

What is the current behavior?

Both CSS and angular animations are completely ignored when detaching a view from the overlay

What are the steps to reproduce?

    // Returns an OverlayRef (which is a PortalHost)
    const overlayRef = overlay.create();

    // Create ComponentPortal that can be attached to a PortalHost
    const overlayChildPortal = new ComponentPortal(OverlayChildComponent);

    // Attach ComponentPortal to PortalHost
    overlayRef.attach(overlayChildPortal);

    ...

    overlayRef.detach(); /* <- No animation triggers whatsoever */

    /* I've tried this as well */
    overlayRef.dispose(); /* <- No luck... */

What is the use-case or motivation for changing an existing behavior?

Uneasy on the eyes when removing overlays

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 5.0.0,
Angular CDK 5.0.0-rc-0
Typescript 2.5.0
Ubuntu 16.04
Google Chrome

Metadata

Metadata

Assignees

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