Browse Source

Merge pull request #737 from return42/fix-542

[fix] autocomple.js: register li.onmousedown instead li.onclick
Markus Heiser 3 years ago
parent
commit
f4004133b6

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/js/searxng.min.js


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/js/searxng.min.js.map


+ 10 - 0
searx/static/themes/simple/src/js/main/search.js

@@ -73,6 +73,16 @@
             this.DOMResults.style.left = this.Input.offsetLeft + "px";
             this.DOMResults.style.left = this.Input.offsetLeft + "px";
             this.DOMResults.style.width = this.Input.clientWidth + "px";
             this.DOMResults.style.width = this.Input.clientWidth + "px";
           },
           },
+          _Open: function () {
+            var params = this;
+            Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) {
+              if (li.getAttribute("class") != "locked") {
+                li.onmousedown = function () {
+                  params._Select(li);
+                };
+              }
+            });
+          },
         }, "#" + qinput_id);
         }, "#" + qinput_id);
 
 
         // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37
         // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37

Some files were not shown because too many files changed in this diff