Skip to content

Commit

Permalink
JS: Do not apply 'menu-hovered' on #layout
Browse files Browse the repository at this point in the history
refs #3904
  • Loading branch information
flourish86 committed Nov 13, 2019
1 parent af35f17 commit c6ba394
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions public/js/icinga/behavior/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,25 +277,19 @@
var $flyout = $target.find('.nav-level-2');

if (! $flyout.length) {
$layout.removeClass('menu-hovered');
$target.siblings().not($target).removeClass('hover');
return;
}

var delay = 300;

if ($layout.hasClass('menu-hovered')) {
delay = 0;
}

setTimeout(function() {
try {
if (! $target.is(':hover')) {
return;
}
} catch(e) { /* Bypass because if IE8 */ }

$layout.addClass('menu-hovered');
$target.siblings().not($target).removeClass('hover');
$target.addClass('hover');

Expand Down Expand Up @@ -325,8 +319,6 @@
var $hovered = $('#menu').find('.nav-level-1 > .nav-item.hover');

if (! $hovered.length) {
$layout.removeClass('menu-hovered');

return;
}

Expand All @@ -337,7 +329,6 @@
}
} catch(e) { /* Bypass because if IE8 */ };
$hovered.removeClass('hover');
$layout.removeClass('menu-hovered');
}, 600);
};

Expand Down

0 comments on commit c6ba394

Please sign in to comment.