Skip to content

Commit

Permalink
fix(popover): popover not positioned properly
Browse files Browse the repository at this point in the history
Closes #1649
  • Loading branch information
mschoudry authored and pkozlowski-opensource committed Jun 30, 2017
1 parent 95d1668 commit 85fadb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ export class NgbPopover implements OnInit, OnDestroy {
window.document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);
}

// position popover along the element
positionElements(
this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement,
this.container === 'body');

// we need to manually invoke change detection since events registered via
// Renderer::listen() are not picked up by change detection with the OnPush strategy
this._windowRef.changeDetectorRef.markForCheck();
Expand Down

0 comments on commit 85fadb8

Please sign in to comment.