From c435a7eb78adfcba677dfe14023b6f16934ebbc9 Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Thu, 14 May 2026 14:39:13 +0100 Subject: [PATCH] search key nav fixes 4 --- assets/scripts/search.js | 16 +++++++++++----- gitea-build-monitor.log | 8 ++++++++ posts/posts-list.org | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/assets/scripts/search.js b/assets/scripts/search.js index 0ce01fd..64e5b2f 100755 --- a/assets/scripts/search.js +++ b/assets/scripts/search.js @@ -197,12 +197,20 @@ function isSearchOpen() { function focusPaneInput() { if (!isSearchOpen()) return; - paneInput.focus(); + paneInput.focus({ preventScroll: true }); try { paneInput.setSelectionRange(paneInput.value.length, paneInput.value.length); } catch (_) {} } +function schedulePaneInputFocus() { + focusPaneInput(); + window.requestAnimationFrame(() => { + focusPaneInput(); + window.requestAnimationFrame(focusPaneInput); + }); +} + function openSearchPane(initialValue = "") { const value = initialValue || searchInput?.value || paneInput?.value || ""; @@ -214,9 +222,7 @@ function openSearchPane(initialValue = "") { setHeaderSearchValue(value); renderResults(value); - focusPaneInput(); - window.requestAnimationFrame(focusPaneInput); - window.setTimeout(focusPaneInput, 0); + schedulePaneInputFocus(); } function closeSearchPane() { @@ -249,7 +255,7 @@ function updateActiveResult(focusActive = false) { block: "nearest", behavior: "smooth", }); - if (focusActive) items[activeIndex].focus({ preventScroll: true }); + if (focusActive) focusPaneInput(); } } diff --git a/gitea-build-monitor.log b/gitea-build-monitor.log index 5e04d22..c7da817 100644 --- a/gitea-build-monitor.log +++ b/gitea-build-monitor.log @@ -65,3 +65,11 @@ 2026-05-14T14:20:57.3821083+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. 2026-05-14T14:20:57.4511389+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 2026-05-14T14:20:57.7269914+01:00 [INFO] Sent authoring server test notification. +2026-05-14T14:28:51.7619799+01:00 [INFO] Prepared current build status for zaine/org_web: severity=Info, status=success +2026-05-14T14:28:51.7691306+01:00 [INFO] Fetching recent Gitea Actions runs for zaine/org_web. +2026-05-14T14:28:52.0226534+01:00 [ERROR] Failed to analyze job 260: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T14:28:52.0288876+01:00 [ERROR] Failed to analyze job 259: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T14:28:52.7198313+01:00 [INFO] Sent build status notification with 1 embed(s). +2026-05-14T14:28:52.7399390+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. +2026-05-14T14:28:52.8118097+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 +2026-05-14T14:28:53.1416315+01:00 [INFO] Sent authoring server test notification. diff --git a/posts/posts-list.org b/posts/posts-list.org index 949d103..eb83b75 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:14-05-2026 14:15@@ +- [[file:career/career-list.org][Career List]] @@html:14-05-2026 14:28@@ - [[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:@@