Browse Source

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

Jordi Boggiano 11 năm trước cách đây
mục cha
commit
ab30753ebe
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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;
         }