From: Alexander Ebert Date: Sat, 10 Sep 2016 16:42:43 +0000 (+0200) Subject: Search button now properly toggles the input visibility X-Git-Tag: 3.0.0_Beta_1~230 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c8c4536ed8e357de7ed5d81deee1d93664a42a2f;p=GitHub%2FWoltLab%2FWCF.git Search button now properly toggles the input visibility --- 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 347153e188..69c643320e 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 @@ -58,6 +58,10 @@ define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen', event.preventDefault(); event.stopPropagation(); + if (_pageHeader.classList.contains('searchBarOpen')) { + return this._closeSearchBar(); + } + var facadeHeight = pageHeaderFacade.clientHeight; var scrollTop = window.pageYOffset; var skipScrollHandler = false; @@ -115,7 +119,7 @@ define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen', _closeSearchBar: function () { _pageHeader.classList.remove('searchBarOpen'); - console.debug("yep"); + ['bottom', 'left', 'right', 'top'].forEach(function(propertyName) { _searchInputContainer.style.removeProperty(propertyName); });