From: Marcel Werk Date: Sun, 9 Aug 2020 12:02:34 +0000 (+0200) Subject: Skip the menu indicator on mobile if only sub level items have counters X-Git-Tag: 5.3.0_Alpha_1~78 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9e8e380a80964f7cc467e5b55aa73635d4ab698;p=GitHub%2FWoltLab%2FWCF.git Skip the menu indicator on mobile if only sub level items have counters Closes #3164 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js index e07e7d37ad..9418ee8c96 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js @@ -550,8 +550,9 @@ define(['Core', 'Environment', 'EventHandler', 'Language', 'ObjectMap', 'Dom/Tra _updateButtonState: function() { var hasNewContent = false; + var itemList = elBySel('.menuOverlayItemList', this._menu); elBySelAll('.badgeUpdate', this._menu, function (badge) { - if (~~badge.textContent > 0) { + if (~~badge.textContent > 0 && badge.closest('.menuOverlayItemList') === itemList) { hasNewContent = true; } });