Explorar o código

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

Jordi Boggiano %!s(int64=11) %!d(string=hai) anos
pai
achega
ab30753ebe
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;
         }