Skip to content

Commit

Permalink
fix(popup): fix layout flicker when opening popup
Browse files Browse the repository at this point in the history
Set `position: absolute` before the reflow caused by `hello`
  • Loading branch information
tobyzerner committed Mar 17, 2023
1 parent 6629400 commit 42a397b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/popup/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ export default class PopupElement extends HTMLElement {
if (!this.content.hidden) return;

this.content.hidden = false;
this.content.style.position = 'absolute';

this.backdrop.hidden = false;

hello(this.content);
hello(this.backdrop);

this.button.setAttribute('aria-expanded', 'true');

this.content.style.position = 'absolute';

this.cleanup = autoUpdate(
this.button,
this.content,
Expand Down

0 comments on commit 42a397b

Please sign in to comment.