Browse Source

Fix bug on search when reloading a page and then hitting control keys when the search is empty

Jordi Boggiano 11 years ago
parent
commit
ab30753ebe
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Packagist/WebBundle/Resources/public/js/search.js

+ 3 - 1
src/Packagist/WebBundle/Resources/public/js/search.js

@@ -35,7 +35,9 @@
         }
 
         if ($('#search_query_query').val().match(/^\s*$/) !== null) {
-            list.addClass('hidden');
+            if (previousQuery !== undefined) {
+                list.addClass('hidden');
+            }
             return;
         }