• This bug can be reproduced on the Max Mega Menu homepage in Chrome (My Version: 85.0.4183.102) on Microsoft Windows 10: In the demo section on the WIDGETS menu select one of the INPUT elements and try to use autocomplete to fill-out the field.

    I was able to fix this in maxmegamenu.js version 2.7.3 in line 263ff with this code: if the element being losing the focus is an INPUT or a TEXTAREA element, skip hiding the menu:

    
    var bindHoverIntentEvents = function() {
                items_with_submenus.hoverIntent({
                    over: function () {
                        plugin.unbindClickEvents();
                        if (! $(this).hasClass("mega-toggle-on")) {
                            plugin.showPanel($(this).children("a.mega-menu-link"));
                        }
                    },
                    out: function (e) {
                        if ($(this).hasClass("mega-toggle-on") && ! $(this).hasClass("mega-disable-collapse") && ! $(this).parent().parent().hasClass("mega-menu-tabbed")) {
                            if (e.target.localName === 'input' || e.target.localName === 'textarea') return;
                            plugin.hidePanel($(this).children("a.mega-menu-link"), false);
                        }
                    },
                    timeout: megamenu.timeout,
                    interval: megamenu.interval
                });
            };
    

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi kriede,

    Thanks for reporting this and suggesting a fix – it looks good.

    I’m looking further into it now as it feels like the kind of thing that may have unintended consequences. I can see one issue where if you open the auto complete, then quickly move your mouse off the menu, the sub menu remains open. I’ll let you know when I have an update.

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘Bug: autocomplete closes menu unintended’ is closed to new replies.