Преглед на файлове

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

Jordi Boggiano преди 11 години
родител
ревизия
ab30753ebe
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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;
         }