From 596a5751b1eec953b0e74367165cc70e0ce546cf Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 1 Jun 2013 17:34:11 +0200 Subject: [PATCH] Fixes issue of periodically hidden search suggestions --- wcfsetup/install/files/js/WCF.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 1dd42adbfc..ed8265acca 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5290,7 +5290,7 @@ WCF.Search.Base = Class.extend({ data: { excludedSearchValues: this._excludedSearchValues, searchString: $content - } + } }; this._proxy.setOption('data', { @@ -5442,7 +5442,7 @@ WCF.Search.Base = Class.extend({ WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(); }, this)); - if (!this._list.is(':visible')) { + if (!WCF.Dropdown.getDropdownMenu(this._searchInput.parents('.dropdown').wcfIdentify()).hasClass('dropdownOpen')) { WCF.Dropdown.toggleDropdown(this._searchInput.parents('.dropdown').wcfIdentify()); } @@ -5521,7 +5521,11 @@ WCF.Search.Base = Class.extend({ this._searchInput.val(''); } - this._list.removeClass('dropdownOpen').end().empty(); + // close dropdown + WCF.Dropdown.getDropdown(this._searchInput.parents('.dropdown').wcfIdentify()).removeClass('dropdownOpen'); + WCF.Dropdown.getDropdownMenu(this._searchInput.parents('.dropdown').wcfIdentify()).removeClass('dropdownOpen'); + + this._list.end().empty(); WCF.CloseOverlayHandler.removeCallback('WCF.Search.Base'); -- 2.20.1