Skip to content

Commit

Permalink
add workaround for browsers that don't support popover
Browse files Browse the repository at this point in the history
  • Loading branch information
jamband committed Aug 17, 2024
1 parent ee10ba1 commit 349201f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/popover/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ const title = "popover";
if (!drawerFooterButton) throw new Error(`${selector} does not exists.`);

drawerFooterButton.addEventListener("click", () => {
drawer.hidePopover();
if ("popover" in HTMLElement.prototype) {
drawer.hidePopover();
} else {
drawer.style.display = "none";
}
});

// toast
Expand Down

0 comments on commit 349201f

Please sign in to comment.