diff options
author | ahmad-alkadri <ahmad.alkadri@outlook.com> | 2023-12-25 14:07:41 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-12-28 18:59:14 +0100 |
commit | 07e846e91a01a36eddbc54cc96542bac7fd37571 (patch) | |
tree | 6e2d163d8deb8a23dad5b2e95f3aa8fc94fc3295 /searx/static | |
parent | 8dfc1dbc5c0ed4968a7111909dc597a755cc94c6 (diff) | |
download | searxng-07e846e91a01a36eddbc54cc96542bac7fd37571.tar.gz searxng-07e846e91a01a36eddbc54cc96542bac7fd37571.zip |
Prevent default browser behavior on click event
Diffstat (limited to 'searx/static')
-rw-r--r-- | searx/static/themes/simple/src/js/main/results.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/searx/static/themes/simple/src/js/main/results.js b/searx/static/themes/simple/src/js/main/results.js index 0b0aebe12..7342f94b2 100644 --- a/searx/static/themes/simple/src/js/main/results.js +++ b/searx/static/themes/simple/src/js/main/results.js @@ -92,8 +92,14 @@ e.preventDefault(); searxng.closeDetail(); }); - searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false)); - searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false)); + searxng.on('.result-detail-previous', 'click', e => { + e.preventDefault(); + searxng.selectPrevious(false) + }); + searxng.on('.result-detail-next', 'click', e => { + e.preventDefault(); + searxng.selectNext(false); + }); w.addEventListener('scroll', function () { var e = d.getElementById('backToTop'), |