From af0c8990a6afef42bfc82fc9b6b23f4368b5c07c Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 20 Mar 2023 18:30:30 +0100 Subject: [PATCH] PhotosIndex: fix arrow-key based navigation --- public/js/albumnav.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/albumnav.js b/public/js/albumnav.js index fc8cfe6..ec041f0 100644 --- a/public/js/albumnav.js +++ b/public/js/albumnav.js @@ -1,14 +1,14 @@ function enableKeyDownNavigation() { document.addEventListener("keydown", function (event) { if (event.keyCode == 37) { - var target = document.querySelector(".pagination ul > :first-child a"); + var target = document.querySelector("ul.pagination > :first-child a"); if (target && target.href) { event.preventDefault(); document.location.href = target.href; } } else if (event.keyCode == 39) { - var target = document.querySelector(".pagination ul > :last-child a"); + var target = document.querySelector("ul.pagination > :last-child a"); if (target && target.href) { event.preventDefault(); document.location.href = target.href;