diff --git a/CHANGELOG b/CHANGELOG index 5390c5e9c1..3550bd686f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Cacti CHANGELOG -issue#2523: Test email failure on PHP 7.3 -issue#2589: DSStats throws errors when RRDfile has not been created -issue#2590: Language selection is not working as expected +-issue#2591: Drill down to some pages may be incorrect due to logic issues -issue#2592: Display graphs from this aggregate can not work -issue#2593: Can not migrate aggregate to use a template -issue#2598: Create aggregate without aggregate graph tempate, rrdtools error diff --git a/include/layout.js b/include/layout.js index 52e1d5c9fb..a675db0cfa 100644 --- a/include/layout.js +++ b/include/layout.js @@ -1753,10 +1753,10 @@ function loadPage(href, force) { pageName = basename(hrefParts[0]); if (pageName != '') { - if ($('#menu').find("a[href*='"+href+"']").length > 0) { + if ($('#menu').find("a[href^='"+href+"']").length > 0) { $('#menu').find('.pic').removeClass('selected'); - $('#menu').find("a[href*='"+href+"']").addClass('selected'); - } else { + $('#menu').find("a[href^='"+href+"']").addClass('selected'); + } else if ($('#menu').find("a[href*='/"+pageName+"']").length > 0) { $('#menu').find('.pic').removeClass('selected'); $('#menu').find("a[href*='/"+pageName+"']").addClass('selected'); } @@ -2642,9 +2642,7 @@ function keepWindowSize() { $('.ellipsis').show(); } }, 50, 'resize-content'); - }); - - $(window).trigger('resize'); + }).trigger('resize') } function hideCurrentTab(id, shrinking) {