Force-close dropdowns on search open
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Sep 2016 15:28:52 +0000 (17:28 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Sep 2016 15:28:52 +0000 (17:28 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Header/Fixed.js

index 7a6f24ed1bea4c0a58e851cd6b8b94f5f419b558..59106da60a050b2149240bcfb7cdb51020e39ef6 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLabSuite/Core/Ui/Page/Header/Fixed
  */
-define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen', 'Ui/Scroll', 'Ui/SimpleDropdown'], function(Core, EventHandler, UiAlignment, UiCloseOverlay, UiScreen, UiScroll, UiSimpleDropdown) {
+define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen'], function(Core, EventHandler, UiAlignment, UiCloseOverlay, UiScreen) {
        "use strict";
        
        var _pageHeader, _pageHeaderContainer, _pageHeaderPanel, _pageHeaderSearch, _searchInput, _topMenu, _userPanelSearchButton;
@@ -81,6 +81,8 @@ define(['Core', 'EventHandler', 'Ui/Alignment', 'Ui/CloseOverlay', 'Ui/Screen',
                 * @protected
                 */
                _openSearchBar: function() {
+                       window.WCF.Dropdown.Interactive.Handler.closeAll();
+                       
                        _pageHeader.classList.add('searchBarOpen');
                        _userPanelSearchButton.parentNode.classList.add('open');