From c8c4536ed8e357de7ed5d81deee1d93664a42a2f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 10 Sep 2016 18:42:43 +0200 Subject: [PATCH] Search button now properly toggles the input visibility --- .../files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }); -- 2.20.1