fix where clicking on teaser body text goes to

This commit is contained in:
rimu 2024-12-19 10:21:03 +13:00
parent 52ba7203d8
commit dce17fd094

View file

@ -39,7 +39,7 @@ document.addEventListener("DOMContentLoaded", function () {
function setupPostTeaserHandler() { function setupPostTeaserHandler() {
document.querySelectorAll('.post_teaser_clickable').forEach(div => { document.querySelectorAll('.post_teaser_clickable').forEach(div => {
div.onclick = function() { div.onclick = function() {
const firstAnchor = this.parentElement.querySelector('a'); const firstAnchor = this.parentElement.querySelector('h3 a');
if (firstAnchor) { if (firstAnchor) {
window.location.href = firstAnchor.href; window.location.href = firstAnchor.href;
} }