diff --git a/files/assets/js/comments+submission_listing.js b/files/assets/js/comments+submission_listing.js index a871f14c4..72a59395e 100644 --- a/files/assets/js/comments+submission_listing.js +++ b/files/assets/js/comments+submission_listing.js @@ -47,4 +47,24 @@ function popclick(author) { document.getElementsByClassName('pop-coins')[i].innerHTML = author["coins"] document.getElementsByClassName('pop-viewmore')[i].href = author["url"] document.getElementsByClassName('pop-badges')[i].innerHTML = badges -} \ No newline at end of file + + let popfix = document.getElementById("popover-fix") + if (popfix) document.body.removeChild(popfix); + + var popover_old = document.getElementsByClassName("popover")[0]; + var popover_new = document.createElement("DIV"); + + popover_new.innerHTML = popover_old.outerHTML; + popover_new.id = "popover-fix"; + + document.body.appendChild(popover_new); + document.body.removeChild(popover_old); +} + +document.addEventListener("click", function(){ + active = document.activeElement.getAttributeNode("class"); + if (!(active && active.nodeValue == "user-name text-decoration-none")){ + let popfix = document.getElementById("popover-fix") + if (popfix) document.body.removeChild(popfix); + } +}); \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 230db87a7..88b832bcf 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -764,7 +764,7 @@ {% include "expanded_image_modal.html" %} - + - + \ No newline at end of file