Problem with offcanvas menu


Hi - I've been having a problem with the offcanvas menu burger button not opening the menu.

Any ideas/suggestions about why this could be happening and how I could debug this?

Thank you very very much in advance! πŸ™‚


Hello @umutg, I've never experienced a bug like this with the offcanvas menu. Could you please give some details about your problem (browser, etc.) Thank you ! M


Hi Mathieu,

I personally don't think it's a bug, there's a big chance it's got to do with my setup and pretty questionable coding on my part πŸ˜€

I'm having the problem on all browsers (IE, firefox, chrome), desktop and mobile.

It didn't work when I first setup the theme either - I added some js that toggled overflow-x on body,html when the burger button was clicked as a workaround. However after updating wordpress to the latest version on the staging site I'm working on, I have the same problem and I really can't figure any solution or workaround this time.


Hi Umut, That's odd... Have try to deactivate all your plugins ? A link to your staging site would be helpful, too. πŸ™‚ Mat


Yes I've already tried that - to no avail, unfortunately...

Is there a way I could reach you through email?


OK got it to work - the off-canvas component page on the UIKIT docs says:

<!-- This is the button toggling the off-canvas sidebar -->
<button class="uk-button" data-uk-offcanvas="{target:'#my-id'}">...</button>

<!-- This is the off-canvas sidebar -->
<div id="my-id" class="uk-offcanvas">
    <div class="uk-offcanvas-bar">
        <div class="uk-panel">...</div>
    </div>
</div>

My theme, was missing the ="{target:'#my-id'}" part. Which is strange, because I thought that would be inserted in the beans theme by default. (Or maybe I did something that removes it?!)

Thank you very much for your time, Mathieu, much appreciated!


Hey Umut,

Beans off-canvase definitely works by default and you shouldn't have to do any modification to get it working.

  1. If it doesn't work with no child theme and no plugins installed, please share the link and I will take a look.
  2. If it breack after activating you child theme or plugin, then something might be incorrect in your custom modification πŸ˜‰

Please let me know if you encounter issues with Beans default theme so that I can look into it asap.

Thanks,


Hello everyone, I also reflected a constant problem with offcanvas menu.

The submenus items are having some problems, do not open the first click.

I installed Wordpress 4.6.1 with a clean installation of Beans 1.4.0 without Plugin.

You can see the bug in this test link: http://fabiogalli.netsons.org/

If you need the access, I will send you also those.

Thank you. Fabio


Hi guys,

@fabio this answer explains why this behaviour is expected and what you can do to modify it according to your needs.

Have fun,


Thanks πŸ™‚

Write a reply

Login or register to write a reply, it's free!