diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-12-08 20:28:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-08 20:28:35 +0100 |
| commit | 2a262df0bb1f6bc9c1ccb37894cd9501d00c8349 (patch) | |
| tree | 8189a865e08e2b0edcfe069d5fba464cfd1415b6 /searx/static/themes/simple/src | |
| parent | b5c9cc4ff39be390aabb2794b2a5ba8a9fc1f713 (diff) | |
| parent | d6d6585b26ab8159dc38794e171f8052ffdb0865 (diff) | |
Merge pull request #582 from return42/fix-autocomplete-csp
[fix] simple theme: make autocomplete-js CSP compliant
Diffstat (limited to 'searx/static/themes/simple/src')
| -rw-r--r-- | searx/static/themes/simple/src/js/main/search.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/static/themes/simple/src/js/main/search.js b/searx/static/themes/simple/src/js/main/search.js index 0244a90ea..09a90b7e9 100644 --- a/searx/static/themes/simple/src/js/main/search.js +++ b/searx/static/themes/simple/src/js/main/search.js @@ -54,7 +54,7 @@ if (qinput !== null) { // clear button createClearButton(qinput); - + // autocompleter if (searxng.autocompleter) { searxng.autocomplete = AutoComplete.call(w, { @@ -67,6 +67,12 @@ }, MinChars: 4, Delay: 300, + _Position:function() { + this.DOMResults.setAttribute("class", "autocomplete"); + this.DOMResults.style.top = (this.Input.offsetTop + this.Input.offsetHeight) + "px"; + this.DOMResults.style.left = this.Input.offsetLeft + "px"; + this.DOMResults.style.width = this.Input.clientWidth + "px"; + }, }, "#" + qinput_id); // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37 |