Header mega menu dropdown disappears too quickly

Topic summary

A user is experiencing an issue with a custom mega menu dropdown that closes too quickly when hovering. They’re using the Dawn theme and have implemented JavaScript code to create a hover effect on header menu items.

The Problem:

  • The dropdown disappears before users can select any options
  • Need to add a delay before the menu closes

Current Implementation:

  • Using JavaScript to add mouseover/mouseleave event listeners on .header__inline-menu details elements
  • The menu removes the ‘open’ attribute immediately on mouseleave

Note: The code snippet appears corrupted/reversed in parts, which may indicate a copy-paste error or encoding issue. The user is seeking guidance on how to modify the timing behavior to improve usability.

Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

I currently have a dropdown hover effect using this code:

The dropdown effect disappears too quickly so i can’t choose any options. Is there a way to create a delay in the dropdown before it closes. I am using the dawn theme

Thank you

https://2t7fv3x3fzbxjhed-78682521917.shopifypreview.com