acolangelo/jPanelMenu

Page redirected to index when panel is closed (just on mobile)

Closed this issue · 2 comments

I've been dealing with this strange behavior. On my iPhone, when I close the offcanvas menu, the browser is reloaded and goes to the index.html. Ipad and Desktop works fine.

If I turn the plugin off (commenting: jPM.on();) the problem dissapears, so I guess it has to do with this plugin. Unfortunately this is not an option.

You can take a look here. http://beta.belajoo.com/

Hope someone has an idea how to fix this.

Thanks

Simplest solution is to add closeOnContentClick: false
so you get something like this:

    var jPM = $.jPanelMenu({
    menu: '#YourMenuContainerID',
    trigger: '.yourMenuTriggerClass',
    closeOnContentClick: false  // fix for android bug where closing the menu redirects to site root.
    duration: 500
    });
    jPM.on();

There is another thread below about clicking on menu button not closing the menu panel when closeOnContentClick is true (the default).
Oddly, this is actually the same issue, so look there if you need to close on any click outside the menu panel. Probably just doing the above will be satisfactory though.

This was an event collision issue, which has been patched in #27.