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

fix(popup): Fixed conflict with BrowserAnimationsModule #234

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/modules/popup/classes/popup-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ export abstract class SuiPopupController implements IPopup, OnDestroy {
});
}

// Detach & reattach the generated component to the current application.
this._componentFactory.detachFromApplication(this._componentRef);
// Attach the generated component to the current application.
this._componentFactory.attachToApplication(this._componentRef);

// Move the generated element to the body to avoid any positioning issues.
Expand Down Expand Up @@ -151,7 +150,6 @@ export abstract class SuiPopupController implements IPopup, OnDestroy {
}
}

// @HostListener("document:click", ["$event"])
public onDocumentClick(e:MouseEvent):void {
// If the popup trigger is outside click,
if (this._componentRef && this.popup.config.trigger === PopupTrigger.OutsideClick) {
Expand Down Expand Up @@ -179,6 +177,7 @@ export abstract class SuiPopupController implements IPopup, OnDestroy {

public ngOnDestroy():void {
clearTimeout(this._openingTimeout);
this._componentFactory.detachFromApplication(this._componentRef);
this._componentRef.destroy();
}
}