DROP DOWN MENU - TWO OR MORE SUBMENUS OPENING TOGETHER

danbot
Excursionist
59 0 6

hello, 

i'm experiencing this issue on dawn theme, if I open one submenu and then another, the first one doesn't close automatically, can please someone help me? 

 

thank you

https://c168e5.myshopify.com/

pw: subnormal

Schermata 2023-10-26 alle 18.18.39.png

Replies 2 (2)

lockit-mizzrawr
Tourist
4 0 0

No answer yet huh?....I'm having the same issue  😔

lockit-mizzrawr
Tourist
4 0 0

If anyone is still searching for a solution, just add the next function in your global.js file, around line 26 (it should be inside an addEventListener function): 

   event.currentTarget
      .closest("ul")
      .querySelectorAll("details[open]")
      .forEach((el) => {
        if (el !== summary.parentElement) {
          el.removeAttribute("open");
        }
      });