Skip to content

Commit

Permalink
Fixed popup positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
edcarroll committed Mar 28, 2017
1 parent c776547 commit 70ee3bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/popup/popup.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ export class SuiPopupDirective {
if (!this._popupComponentRef) {
const factory = this._componentFactoryResolver.resolveComponentFactory(SuiPopup);
this._popupComponentRef = this._viewContainerRef.createComponent(factory);

// Append the generated element to the body to avoid any positioning issues.
document.querySelector("body").appendChild(this._popupComponentRef.location.nativeElement);

this._popup.onClose.subscribe(() => {
this._popupComponentRef.destroy();
Expand Down

0 comments on commit 70ee3bc

Please sign in to comment.