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(); e.preventDefault();
searxng.closeDetail(); searxng.closeDetail();
}); });
searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false)); searxng.on('.result-detail-previous', 'click', e => {
searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false)); e.preventDefault();
searxng.selectPrevious(false)
});
searxng.on('.result-detail-next', 'click', e => {
e.preventDefault();
searxng.selectNext(false);
});
w.addEventListener('scroll', function () { w.addEventListener('scroll', function () {
var e = d.getElementById('backToTop'), var e = d.getElementById('backToTop'),