From 41d5f8820eaf4f403ca8c64bb3234b1a058c6031 Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Thu, 14 May 2026 14:20:07 +0100 Subject: [PATCH] search key nav fixes 2 --- assets/scripts/search.js | 11 +++++++---- gitea-build-monitor.log | 6 ++++++ sitemap.org | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/assets/scripts/search.js b/assets/scripts/search.js index 0afe885..eae5f0d 100755 --- a/assets/scripts/search.js +++ b/assets/scripts/search.js @@ -195,6 +195,11 @@ function isSearchOpen() { return modal.classList.contains("is-open"); } +function focusPaneInput() { + paneInput.focus({ preventScroll: true }); + paneInput.setSelectionRange(paneInput.value.length, paneInput.value.length); +} + function openSearchPane(initialValue = "") { const value = initialValue || searchInput?.value || paneInput?.value || ""; @@ -206,10 +211,8 @@ function openSearchPane(initialValue = "") { setHeaderSearchValue(value); renderResults(value); - window.setTimeout(() => { - paneInput.focus(); - paneInput.setSelectionRange(paneInput.value.length, paneInput.value.length); - }, 0); + focusPaneInput(); + window.requestAnimationFrame(focusPaneInput); } function closeSearchPane() { diff --git a/gitea-build-monitor.log b/gitea-build-monitor.log index 85c695d..2ebdb03 100644 --- a/gitea-build-monitor.log +++ b/gitea-build-monitor.log @@ -52,3 +52,9 @@ 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. +2026-05-14T14:15:30.2211122+01:00 [INFO] Prepared current build status for zaine/org_web: severity=Info, status=success +2026-05-14T14:15:30.2292131+01:00 [INFO] Fetching recent Gitea Actions runs for zaine/org_web. +2026-05-14T14:15:31.1154869+01:00 [INFO] Sent build status notification with 1 embed(s). +2026-05-14T14:15:31.1342011+01:00 [INFO] Running authoring server tests with /home/zaine/master-folder/projects/authoring-service/.venv/bin/python. +2026-05-14T14:15:31.2003446+01:00 [INFO] Authoring server tests passed: ran=0, failures=0, errors=0, skipped=0, exit=0 +2026-05-14T14:15:31.5146611+01:00 [INFO] Sent authoring server test notification. diff --git a/sitemap.org b/sitemap.org index 14b544d..b082557 100755 --- a/sitemap.org +++ b/sitemap.org @@ -47,12 +47,12 @@ - [[file:tags/notes.org][Tag: notes]] - [[file:tags/review.org][Tag: review]] - [[file:tags/website.org][Tag: website]] - - [[file:tags/update.org][Tag: update]] - [[file:tags/life.org][Tag: life]] - - [[file:tags/education.org][Tag: education]] + - [[file:tags/update.org][Tag: update]] - [[file:tags/insights.org][Tag: insights]] - - [[file:tags/reading.org][Tag: reading]] - [[file:tags/emacs.org][Tag: emacs]] + - [[file:tags/education.org][Tag: education]] + - [[file:tags/reading.org][Tag: reading]] - [[file:tags/maths.org][Tag: maths]] - posts - [[file:posts/posts-intro.org][Posts Introduction]]