diff --git a/assets-src/js/main/cards.js b/assets-src/js/main/cards.js index 8122ae9d..f44e3050 100644 --- a/assets-src/js/main/cards.js +++ b/assets-src/js/main/cards.js @@ -26,13 +26,16 @@ let cardEnhancement = function () { } - card.addEventListener('click', function() { + card.addEventListener('click', function(ev) { + if (ev.redispatched || ev.target === mainLink) { + return; + } let noTextSelected = !window.getSelection().toString(); if (noTextSelected) { - - mainLink.click(); - + const ev2 = new MouseEvent("click", ev); + ev2.redispatched = true; + mainLink.dispatchEvent(ev2); } }); @@ -43,4 +46,4 @@ let cardEnhancement = function () { }; -export {cardEnhancement}; \ No newline at end of file +export {cardEnhancement};