From: Marcel Werk Date: Wed, 31 Aug 2016 17:04:17 +0000 (+0200) Subject: Fixed closing of the search bar when selecting a search type X-Git-Tag: 3.0.0_Beta_1~373 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1483c2bb58c9d3e7f81e08e98647baf838412955;p=GitHub%2FWoltLab%2FWCF.git Fixed closing of the search bar when selecting a search type --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js index 127a8974e7..47b68fda0c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js @@ -108,6 +108,8 @@ define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen', }); UiCloseOverlay.add('WoltLabSuite/Core/Ui/Page/Header/Fixed', function() { + if (_pageHeader.classList.contains('searchBarForceOpen')) return; + _pageHeader.classList.remove('searchBarOpen'); }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js index 26659ee010..754b5a03c7 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js @@ -46,6 +46,12 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Ui/SimpleDropdown', './Input'], fun _click: function(event) { event.preventDefault(); + var pageHeader = elById('pageHeader'); + pageHeader.classList.add('searchBarForceOpen'); + window.setTimeout(function() { + pageHeader.classList.remove('searchBarForceOpen'); + }, 10); + var objectType = elData(event.currentTarget, 'object-type'); var container = elById('pageHeaderSearchParameters');