Skip to content

Commit 2d8e6ef

Browse files
committed
Added event listener for window resize.
1 parent c88c948 commit 2d8e6ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/uui-popover-container/lib/uui-popover-container.element.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,14 @@ export class UUIPopoverContainerElement extends LitElement {
344344
el.addEventListener('scroll', this.#initUpdate, { passive: true });
345345
});
346346
document.addEventListener('scroll', this.#initUpdate, { passive: true });
347+
window.addEventListener('resize', this.#initUpdate, { passive: true });
347348
}
348349
#stopScrollListener() {
349350
this.#scrollParents.forEach(el => {
350351
el.removeEventListener('scroll', this.#initUpdate);
351352
});
352353
document.removeEventListener('scroll', this.#initUpdate);
354+
window.removeEventListener('resize', this.#initUpdate);
353355
}
354356

355357
/**

0 commit comments

Comments
 (0)