From 389ff4ed1f73c8b03bd0fb237926d5cf51717e7d Mon Sep 17 00:00:00 2001 From: finion Date: Fri, 24 Mar 2017 18:27:41 +0800 Subject: [PATCH] Fix incorrect position on scroll --- src/PopoverContent.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PopoverContent.ts b/src/PopoverContent.ts index d5dd60a..a28d85b 100644 --- a/src/PopoverContent.ts +++ b/src/PopoverContent.ts @@ -67,6 +67,9 @@ export class PopoverContent implements AfterViewInit, OnDestroy { @Input() closeOnMouseOutside: boolean = false; + @Input() + appendToBody: boolean = false; + // ------------------------------------------------------------------------- // Properties // ------------------------------------------------------------------------- @@ -137,7 +140,7 @@ export class PopoverContent implements AfterViewInit, OnDestroy { if (!this.popover || !this.popover.getElement()) return; - const p = this.positionElements(this.popover.getElement(), this.popoverDiv.nativeElement, this.placement); + const p = this.positionElements(this.popover.getElement(), this.popoverDiv.nativeElement, this.placement, this.appendToBody); this.displayType = "block"; this.top = p.top; this.left = p.left;