Fixes issue of periodically hidden search suggestions
authorMatthias Schmidt <gravatronics@live.com>
Sat, 1 Jun 2013 15:34:11 +0000 (17:34 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 1 Jun 2013 15:34:11 +0000 (17:34 +0200)
wcfsetup/install/files/js/WCF.js

index 1dd42adbfc5347caa3d1ebcd51019caf4783e1f0..ed8265acca680928e14ea717a8c2a4bcf4563149 100755 (executable)
@@ -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');