Skip to content

Commit

Permalink
feat(popup): use fixed positioning strategy instead of absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Nov 6, 2023
1 parent 59e693d commit d00137f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/popup/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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: [
Expand Down

0 comments on commit d00137f

Please sign in to comment.