Fixed closing of the search bar when selecting a search type
authorMarcel Werk <burntime@woltlab.com>
Wed, 31 Aug 2016 17:04:17 +0000 (19:04 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 31 Aug 2016 17:04:17 +0000 (19:04 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js

index 127a8974e7da8d5d2af1f8bb1fff6a39f253ddcb..47b68fda0c609ed083ec471af41d10634afd75fb 100644 (file)
@@ -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');
                        });
                        
index 26659ee010ec18db5745b547396014059defbf35..754b5a03c77f477a29559b83b9eb20c2cdb96de9 100644 (file)
@@ -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');