Happening now | Office Hours: Customizing Your Theme With Moeed | Ask your questions now!

Menu won't open and search won't close on mobile

Solved

Menu won't open and search won't close on mobile

Sebastianrode
Tourist
8 0 1

When using my website on the phone, nothing happens when you tap the menu. If you open the search bar, nothing happens when you try to press outside the search field or the X to close. I'm using the Dawn theme, the site is hamonoya-europe.com

How can i fix this?

Accepted Solution (1)

PageFly-Victor
Shopify Partner
7865 1786 3135

This is an accepted solution.

Hi @Sebastianrode,

 

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search theme.liquid

Step 3: Paste the below code at before </head> of the file -> Save

 

   <style>
.js details[open]>.menu-drawer, .js details[open]>.menu-drawer__submenu{

transform:none;
visibility: visible;
 }
</style>
<script>
window.addEventListener('DOMContentLoaded',(event)=>{
document.querySelector('button.search-modal__close-button.modal__close-button.link.link--text.focus-inset').onclick=(e)=>{
    e.target.closest('details').removeAttribute('open')
}
});
</script>

PageFlyVictor_0-1675353047135.png

 

Hope my solution works perfectly for you!

Best regards,

Victor | PageFly 

View solution in original post

Replies 2 (2)

PageFly-Victor
Shopify Partner
7865 1786 3135

This is an accepted solution.

Hi @Sebastianrode,

 

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search theme.liquid

Step 3: Paste the below code at before </head> of the file -> Save

 

   <style>
.js details[open]>.menu-drawer, .js details[open]>.menu-drawer__submenu{

transform:none;
visibility: visible;
 }
</style>
<script>
window.addEventListener('DOMContentLoaded',(event)=>{
document.querySelector('button.search-modal__close-button.modal__close-button.link.link--text.focus-inset').onclick=(e)=>{
    e.target.closest('details').removeAttribute('open')
}
});
</script>

PageFlyVictor_0-1675353047135.png

 

Hope my solution works perfectly for you!

Best regards,

Victor | PageFly 

loganw
New Member
6 0 0

@PageFly-Victor Thank you for this. It worked perfect. Such a relief after spending over an hr with support yesterday and no solution, only frustration. The community is definitely the place to come for support. Learning...