Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mdl dialog create 2 mdl-backdrop-overlay's #1719

Open
maximelkin opened this issue Apr 11, 2019 · 2 comments
Open

Mdl dialog create 2 mdl-backdrop-overlay's #1719

maximelkin opened this issue Apr 11, 2019 · 2 comments

Comments

@maximelkin
Copy link

This leads to bug with closing dialog (page is still clickable and blurred)

@maximelkin maximelkin changed the title Mdl dialog create 2 mdl-backdrop-overlay Mdl dialog create 2 mdl-backdrop-overlay's Apr 11, 2019
@maximelkin
Copy link
Author

This bug reproducing on dialog-outlet placed inside app-root
MdlDialogInnerOutletComponent constructor -> setDefaultViewContainerRef -> setViewContainerRef -> created MdlBackdropOverlayComponent

And

MdlDialogOutletService constructor -> ngZone.onStable.pipe subscribe -> setViewContainerRef -> created MdlBackdropOverlayComponent

So this 2 flows creates 2 MdlBackdropOverlayComponent

@maximelkin
Copy link
Author

Temporary workaround

const initial = (MdlDialogOutletService.prototype as any).setViewContainerRef;
(MdlDialogOutletService.prototype as any).setViewContainerRef = function(...args) {
    if (!this.backdropComponent) {
        initial.apply(this, args);
    }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant