From 5ca45ec975c73414c08613f58ba233c48b36b374 Mon Sep 17 00:00:00 2001 From: EarthlingDavey <15802017+EarthlingDavey@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:24:14 +0100 Subject: [PATCH] =?UTF-8?q?Make=20the=20code=20actually=20work=20?= =?UTF-8?q?=F0=9F=A4=A6=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app/themes/clarity/src/globals/js/ajax-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/themes/clarity/src/globals/js/ajax-utils.js b/public/app/themes/clarity/src/globals/js/ajax-utils.js index d82355c64..9b6fea528 100644 --- a/public/app/themes/clarity/src/globals/js/ajax-utils.js +++ b/public/app/themes/clarity/src/globals/js/ajax-utils.js @@ -95,8 +95,8 @@ export const renderResults = ({ // If we are on a page greater than 1, focus on the first new result. if (currentPage > 1) { - const position = (currentPage - 1) * resultsPerPage + 1; - $("#content").children().eq(position).focus(); + const index = (currentPage - 1) * resultsPerPage; + $("#content").children().eq(index).find('div.content a').focus(); } };