Commit c725499d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Fix responsive main menu when in dropdowns mode"

parents 53d484d2 c5172289
......@@ -148,10 +148,11 @@ jQuery(document).ready(function($) {
close_open_menu();
}
});
menu.click(function(e) {
e.stopPropagation();
$(document).on('click', function(event) {
if (!$(event.target).closest('.has-dropdown').length) {
close_open_menu();
}
});
$(document).click(close_open_menu);
// Helper to close any open dropdowns
function close_open_menu() {
......
......@@ -40,7 +40,7 @@
</button>
{/if}
{if $item.submenu}
<ul id="childmenu-{$dwoo.foreach.menu.index}" class="{if $DROPDOWNMENU}has-dropdown{else}hidden-md hidden-lg hidden-sm {if $item.selected}in{/if}{/if} collapse child-nav" role="menu">
<ul id="childmenu-{$dwoo.foreach.menu.index}" class="{if $DROPDOWNMENU}has-dropdown{else}hidden-md hidden-lg hidden-sm{/if}{if $item.selected} in{/if} collapse child-nav" role="menu">
{strip}
{foreach from=$item.submenu item=subitem}
<li class="{if $subitem.selected}active {/if}{if $subitem.submenu}has-sub {/if}">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment