Site logo

Archived topic

Off Canvas menu problems with closing the button

7 replies · Started by Emanuele on August 6, 2021

Viewing posts 1–8 of 8

Hi,
when I use the close button of the Off Canvas menu it displays an error on the offside.min.js file, you can see attached picture. Do you have any ideas or suggestions?
Thank you

chrome browser inspection canvas menu button closing error

Hi there,

i don't see the Off Canvas Panel enabled on your site ?
But i do see you're using a mega menu - was that enabled with the Off Canvas Panel ? As you may find that is causing a conflict.

Hi David,
excuse me the canvas menu you can only see it in the product archive pages because we use it to show the filters, the menu is activated by clicking at the top right of the "FILTRA PRODOTTI" link.

Thanks for the reply.

Hi Ying,
to see the "Filter Products" link you must be in the shop, in the product pages or in the product archive pages, your screenshot is from the home page.
Thanks for the reply

Hi there,

This error occurs because the script didn't find the .main-navigation .menu-toggle element which is the default toggle used by the off-canvas menu.

I'm not sure if this is intentional but it does seem to be the case with the site you've linked as it is customized to use a different toggle for the off-canvas instead of the default .menu-toggle button.

Hi Elvin,
I am not convinced, I used the class to open the off canvas menu in desktop version: .slideout-toggle and it works perfectly, the error occurs with the closing toggle of the off canvas menu that has not been changed.
Thanks for the reply.

I am not convinced, I used the class to open the off canvas menu in desktop version: .slideout-toggle and it works perfectly, the error occurs with the closing toggle of the off canvas menu that has not been changed.

The particular part of the code that's having an error is this https://share.getcloudapp.com/JruxXYXn - it's looking for the element with selector .main-navigation .menu-toggle to set aria-expanded="true" or aria-expanded="false" on it.

But since it's not finding .main-navigation .menu-toggle on your page, it found .main-navigation .menu-toggle of the script to be NULL, showing the error you see.

This isn't for function btw. It's for semantics/labeling.

This archived topic is closed to new replies.