Skip to content

Commit 70ee3bc

Browse files
committed
Fixed popup positioning
1 parent c776547 commit 70ee3bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/popup/popup.directive.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ export class SuiPopupDirective {
123123
if (!this._popupComponentRef) {
124124
const factory = this._componentFactoryResolver.resolveComponentFactory(SuiPopup);
125125
this._popupComponentRef = this._viewContainerRef.createComponent(factory);
126+
127+
// Append the generated element to the body to avoid any positioning issues.
128+
document.querySelector("body").appendChild(this._popupComponentRef.location.nativeElement);
126129

127130
this._popup.onClose.subscribe(() => {
128131
this._popupComponentRef.destroy();

0 commit comments

Comments
 (0)