Ver Fonte

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

Johan Ahlen há 9 anos atrás
pai
commit
e659bcf
1 ficheiros alterados com 3 adições e 3 exclusões
  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);