1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-17 09:50:13 +01:00

Prevent default browser behavior on click event

This commit is contained in:
ahmad-alkadri 2023-12-25 14:07:41 +01:00 committed by Markus Heiser
parent 8dfc1dbc5c
commit 07e846e91a

View File

@ -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'),