From 9a3a0e61a1006bce1e4234243125603b0f956101 Mon Sep 17 00:00:00 2001 From: Aaron Stephanus Date: Thu, 28 Dec 2023 11:18:13 -0600 Subject: [PATCH] Corrects calendar popup click away listener to allow for previous and next links to perform Signed-off-by: Aaron Stephanus --- _layouts/calendar.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/_layouts/calendar.html b/_layouts/calendar.html index 5f0ddf23b4..742a1ab1ef 100644 --- a/_layouts/calendar.html +++ b/_layouts/calendar.html @@ -76,14 +76,14 @@
{% if page.previous %} - < Previous + < Previous {% else %} Previous {% endif %}
{% if page.next %} - Next > + Next > {% else %} Next > {% endif %} @@ -556,8 +556,11 @@

Connect with the community

const clickWasInsideCard = detailsCard !== null; if (!clickWasInsideCard) { hideEventDetails(currentlyVisibleDetails); - const eventNameLinkClassName = 'events--calendar--body--week--day--event--name--anchor'; - if (!e.target.classList.contains(eventNameLinkClassName)) { + const allowableAnchorClassNames = [ + 'events--calendar--head--prev-next--anchor', + 'events--calendar--body--week--day--event--name--anchor', + ]; + if (!allowableAnchorClassNames.some(className => e.target.classList.contains(className))) { // If an event name was NOT clicked then prevent the default action. // Otherwise allow the navigation to the clicked event to be performed. event.preventDefault();