From a45015fae8aa9e46905fceadbdfb7835921a898f Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Thu, 14 May 2026 14:14:40 +0100 Subject: [PATCH] search key nav fixes --- assets/scripts/search.js | 15 ++++++++------- gitea-build-monitor.log | 29 +++++++++++++++++++++++++++++ posts/posts-list.org | 2 +- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/assets/scripts/search.js b/assets/scripts/search.js index 894e7d2..0afe885 100755 --- a/assets/scripts/search.js +++ b/assets/scripts/search.js @@ -228,7 +228,7 @@ function getResultItems() { return Array.from(modalResults.querySelectorAll(".search-modal-result")); } -function updateActiveResult() { +function updateActiveResult(focusActive = false) { const items = getResultItems(); items.forEach((item, index) => { @@ -242,10 +242,11 @@ function updateActiveResult() { block: "nearest", behavior: "smooth", }); + if (focusActive) items[activeIndex].focus({ preventScroll: true }); } } -function setActiveResult(index) { +function setActiveResult(index, focusActive = false) { const items = getResultItems(); if (!items.length) { activeIndex = -1; @@ -253,7 +254,7 @@ function setActiveResult(index) { } activeIndex = Math.max(0, Math.min(index, items.length - 1)); - updateActiveResult(); + updateActiveResult(focusActive); } function openActiveResult() { @@ -339,25 +340,25 @@ function handleSearchKeydown(e) { switch (e.key) { case "ArrowDown": e.preventDefault(); - if (items.length) setActiveResult(activeIndex + 1); + if (items.length) setActiveResult(activeIndex + 1, true); break; case "ArrowUp": e.preventDefault(); - if (items.length) setActiveResult(activeIndex <= 0 ? items.length - 1 : activeIndex - 1); + if (items.length) setActiveResult(activeIndex <= 0 ? items.length - 1 : activeIndex - 1, true); break; case "Home": if (items.length) { e.preventDefault(); - setActiveResult(0); + setActiveResult(0, true); } break; case "End": if (items.length) { e.preventDefault(); - setActiveResult(items.length - 1); + setActiveResult(items.length - 1, true); } break; diff --git a/gitea-build-monitor.log b/gitea-build-monitor.log index 7fe6ce6..85c695d 100644 --- a/gitea-build-monitor.log +++ b/gitea-build-monitor.log @@ -23,3 +23,32 @@ 2026-05-14T12:07:00.7645657+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. 2026-05-14T12:07:00.8445202+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 2026-05-14T12:07:01.1278394+01:00 [INFO] Sent authoring server test notification. +2026-05-14T12:10:06.0770896+01:00 [INFO] Prepared current build status for zaine/org_web: severity=Info, status=success +2026-05-14T12:10:06.0871124+01:00 [INFO] Fetching recent Gitea Actions runs for zaine/org_web. +2026-05-14T12:10:06.6438305+01:00 [INFO] Analyzed job 256 for zaine/org_web: severity=Critical, status=failure, duration=3s +2026-05-14T12:10:06.6877113+01:00 [ERROR] Failed to analyze job 255: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:10:06.8312283+01:00 [INFO] Analyzed job 254 for zaine/org_web: severity=Critical, status=failure, duration=7s +2026-05-14T12:10:06.8386503+01:00 [ERROR] Failed to analyze job 253: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:10:06.8461173+01:00 [ERROR] Failed to analyze job 252: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:10:06.8565675+01:00 [ERROR] Failed to analyze job 251: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:10:06.8798809+01:00 [ERROR] Failed to analyze job 250: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:10:07.0184261+01:00 [INFO] Analyzed job 249 for zaine/org_web: severity=Critical, status=cancelled, duration=34s +2026-05-14T12:10:07.6645487+01:00 [INFO] Sent build status notification with 1 embed(s). +2026-05-14T12:10:07.6876581+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. +2026-05-14T12:10:07.7701466+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 +2026-05-14T12:10:08.0435739+01:00 [INFO] Sent authoring server test notification. +2026-05-14T12:13:09.0169783+01:00 [INFO] Prepared current build status for zaine/org_web: severity=Info, status=success +2026-05-14T12:13:09.0256217+01:00 [INFO] Fetching recent Gitea Actions runs for zaine/org_web. +2026-05-14T12:13:09.3084234+01:00 [ERROR] Failed to analyze job 257: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.4636377+01:00 [INFO] Analyzed job 256 for zaine/org_web: severity=Critical, status=failure, duration=3s +2026-05-14T12:13:09.4707820+01:00 [ERROR] Failed to analyze job 255: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.5551447+01:00 [INFO] Analyzed job 254 for zaine/org_web: severity=Critical, status=failure, duration=7s +2026-05-14T12:13:09.5610857+01:00 [ERROR] Failed to analyze job 253: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.5671089+01:00 [ERROR] Failed to analyze job 252: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.5750102+01:00 [ERROR] Failed to analyze job 251: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.5812919+01:00 [ERROR] Failed to analyze job 250: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T12:13:09.7037648+01:00 [INFO] Analyzed job 249 for zaine/org_web: severity=Critical, status=cancelled, duration=34s +2026-05-14T12:13:10.4026379+01:00 [INFO] Sent build status notification with 1 embed(s). +2026-05-14T12:13:10.4264267+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. +2026-05-14T12:13:10.5127406+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 +2026-05-14T12:13:10.8568861+01:00 [INFO] Sent authoring server test notification. diff --git a/posts/posts-list.org b/posts/posts-list.org index 28b2524..b78f8e9 100755 --- a/posts/posts-list.org +++ b/posts/posts-list.org @@ -4,7 +4,7 @@ See the categories: @@html:Categories@@ * Posts: -- [[file:career/career-list.org][Career List]] @@html:13-05-2026 23:54@@ +- [[file:career/career-list.org][Career List]] @@html:14-05-2026 12:12@@ - [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:11-03-2026 17:18@@ @@html:@@ @@html:@@ - [[file:career/javascript.org][Understands the Javascript language]] @@html:11-03-2026 16:52@@ @@html:@@ @@html:@@ - [[file:career/restful-api.org][Restful API]] @@html:15-02-2026 23:00@@ @@html:@@ @@html:@@