mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix] dirty fix that keeps click event for image details and mousedown event for result highlighting
This commit is contained in:
parent
9b0b6a2c90
commit
15ba641784
1 changed files with 6 additions and 1 deletions
|
@ -34,7 +34,6 @@ searxng.ready(function () {
|
|||
|
||||
searxng.on('.result', 'click', function (e) {
|
||||
if (!isElementInDetail(e.target)) {
|
||||
highlightResult(this)(true);
|
||||
let resultElement = getResultElement(e.target);
|
||||
if (isImageResult(resultElement)) {
|
||||
e.preventDefault();
|
||||
|
@ -43,6 +42,12 @@ searxng.ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
searxng.on('.result', 'mousedown', function (e) {
|
||||
if (!isElementInDetail(e.target)) {
|
||||
highlightResult(this)(true);
|
||||
}
|
||||
});
|
||||
|
||||
searxng.on('.result a', 'focus', function (e) {
|
||||
if (!isElementInDetail(e.target)) {
|
||||
let resultElement = getResultElement(e.target);
|
||||
|
|
Loading…
Add table
Reference in a new issue