diff --git a/src/opnsense/www/js/opnsense_theme.js b/src/opnsense/www/js/opnsense_theme.js index c52a31327..13717e493 100644 --- a/src/opnsense/www/js/opnsense_theme.js +++ b/src/opnsense/www/js/opnsense_theme.js @@ -106,14 +106,15 @@ $(document).ready(function () { var events = { mouseenter: function() { $("#navigation.col-sidebar-left").css("width", "415px"); - if ($(this).next("div").hasClass("in")) { - } else if ($(this).next().is("a")) { - $(this).nextAll("a").prevAll("a").addClass("collapsed").attr("aria-expanded","false"); - $(this).nextAll("div").prevAll("div").removeClass("in").attr("aria-expanded","false"); - } else { - $(this).trigger("click"); - } - }, + if ($(this).next("div").hasClass("in")) { + /* no action needed */ + } else if ($(this).next().is("a")) { + $(this).nextAll("a").prevAll("a").addClass("collapsed").attr("aria-expanded","false"); + $(this).nextAll("div").prevAll("div").removeClass("in").attr("aria-expanded","false"); + } else { + $(this).trigger("click"); + } + }, mouseleave: function() { $("#navigation.col-sidebar-left").css("width", "70px"); },