Skip to content

Commit

Permalink
fix(popup): Fixed conflict with BrowserAnimationsModule (edcarroll#234)
Browse files Browse the repository at this point in the history
* fix(popup): Fixed conflict with BrowserAnimationsModule

Closes edcarroll#204

* style(popup): Fixed tslint error
  • Loading branch information
edcarroll authored and gotenxds committed Aug 15, 2017
1 parent 72b7498 commit ee4dcce
Showing 1 changed file with 2 additions and 3 deletions.
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();
}
}

0 comments on commit ee4dcce

Please sign in to comment.