From d00137f04bc60ba4f56bb817c7c0e022e38c71e7 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 7 Nov 2023 09:08:49 +1030 Subject: [PATCH] feat(popup): use fixed positioning strategy instead of absolute --- src/popup/popup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/popup/popup.ts b/src/popup/popup.ts index 39eac4d..b3214de 100644 --- a/src/popup/popup.ts +++ b/src/popup/popup.ts @@ -146,7 +146,7 @@ export default class PopupElement extends HTMLElement { if (!this.content.hidden) return; this.content.hidden = false; - this.content.style.position = 'absolute'; + this.content.style.position = 'fixed'; this.backdrop.hidden = false; @@ -160,6 +160,7 @@ export default class PopupElement extends HTMLElement { this.content, () => { computePosition(this.button, this.content, { + strategy: 'fixed', placement: (this.getAttribute('placement') as any) || 'bottom', middleware: [