From: Alexander Ebert Date: Wed, 24 Aug 2016 11:21:25 +0000 (+0200) Subject: Close menu on page option selection X-Git-Tag: 3.0.0_Beta_1~525 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=618e371b0410bbca600bd63f123c7ee344b9af95;p=GitHub%2FWoltLab%2FWCF.git Close menu on page option selection --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js index 2c98df817a..67ecd6f5a4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js @@ -35,6 +35,13 @@ define(['Core', 'Dom/Traverse', './Abstract'], function(Core, DomTraverse, UiPag // remove placeholder item elRemove(DomTraverse.childByClass(_list, 'jsMenuOverlayItemPlaceholder')); + + _list.addEventListener('click', (function (event) { + if (event.target !== _list) { + this.close(); + event.stopPropagation(); + } + }).bind(this)); } },