Skip to content

Commit

Permalink
Update popover-api/nested-popovers/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
teoli2003 authored Apr 25, 2023
1 parent 40a013a commit f86f7c5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions popover-api/nested-popovers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const mainpopover = document.getElementById("mainpopover");
const subpopover = document.getElementById("subpopover");

// Events to show/hide the subpopover when the mouse moves over and out

subcontainer.addEventListener("mouseover", () => {
subpopover.showPopover();
});
Expand All @@ -15,13 +14,11 @@ subcontainer.addEventListener("mouseout", () => {
});

// Event to make the subpopover keyboard-accessible

subcontainer.addEventListener("focusin", () => {
subpopover.showPopover();
});

// Events to hide the popover menus when an option is selected in either of them

mainpopover.addEventListener("click", () => {
if (subpopover.matches(":popover-open")) {
subpopover.hidePopover();
Expand Down

0 comments on commit f86f7c5

Please sign in to comment.