Explorar el Código

HUE-5196 [metadata] You can't search for the same query multiple times

Johan Ahlen hace 9 años
padre
commit
e659bcf
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      desktop/core/src/desktop/templates/assist.mako

+ 3 - 3
desktop/core/src/desktop/templates/assist.mako

@@ -1647,20 +1647,20 @@ from metadata.conf import has_navigator
         }
 
         self.performSearch = function () {
-          if (self.searchInput() === lastQuery) {
-            return;
-          }
           if (self.searchInput() === '') {
             self.searchActive(false);
             return;
           }
           if (!self.searchActive()) {
             self.searchActive(true);
+          } else if (self.searchInput() === lastQuery) {
+            return;
           }
           if (self.searching()) {
             window.setTimeout(function() {
               self.performSearch();
             }, 100);
+            return;
           }
           lastQuery = self.searchInput();
           self.searching(true);