diff --git a/assets/scripts/search.js b/assets/scripts/search.js index eae5f0d..0ce01fd 100755 --- a/assets/scripts/search.js +++ b/assets/scripts/search.js @@ -196,8 +196,11 @@ function isSearchOpen() { } function focusPaneInput() { - paneInput.focus({ preventScroll: true }); - paneInput.setSelectionRange(paneInput.value.length, paneInput.value.length); + if (!isSearchOpen()) return; + paneInput.focus(); + try { + paneInput.setSelectionRange(paneInput.value.length, paneInput.value.length); + } catch (_) {} } function openSearchPane(initialValue = "") { @@ -213,6 +216,7 @@ function openSearchPane(initialValue = "") { focusPaneInput(); window.requestAnimationFrame(focusPaneInput); + window.setTimeout(focusPaneInput, 0); } function closeSearchPane() { @@ -388,10 +392,17 @@ function shouldUseSlashShortcut(event) { } if (searchInput && searchBtn && paneInput && modalResults && paneCount) { + const keepFocusForModal = (e) => e.preventDefault(); + const openFromHeaderControl = (e) => { + e.preventDefault(); + openSearchPane(searchInput.value); + }; + + searchInput.addEventListener("pointerdown", keepFocusForModal); searchInput.addEventListener("focus", () => { if (!suppressHeaderFocus) openSearchPane(searchInput.value); }); - searchInput.addEventListener("click", () => openSearchPane(searchInput.value)); + searchInput.addEventListener("click", openFromHeaderControl); searchInput.addEventListener("input", () => { if (isSyncingHeaderInput) return; @@ -408,7 +419,8 @@ if (searchInput && searchBtn && paneInput && modalResults && paneCount) { paneInput.addEventListener("keydown", handleSearchKeydown); modalResults.addEventListener("keydown", handleSearchKeydown); - searchBtn.addEventListener("click", () => openSearchPane(searchInput.value)); + searchBtn.addEventListener("pointerdown", keepFocusForModal); + searchBtn.addEventListener("click", openFromHeaderControl); modal.addEventListener("click", (e) => { if (e.target.hasAttribute("data-search-close")) { diff --git a/gitea-build-monitor.log b/gitea-build-monitor.log index 2ebdb03..5e04d22 100644 --- a/gitea-build-monitor.log +++ b/gitea-build-monitor.log @@ -58,3 +58,10 @@ 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. +2026-05-14T14:20:56.5835413+01:00 [INFO] Prepared current build status for zaine/org_web: severity=Info, status=success +2026-05-14T14:20:56.5917181+01:00 [INFO] Fetching recent Gitea Actions runs for zaine/org_web. +2026-05-14T14:20:56.8524235+01:00 [ERROR] Failed to analyze job 259: Cannot bind argument to parameter 'LogText' because it is an empty string. +2026-05-14T14:20:57.3626605+01:00 [INFO] Sent build status notification with 1 embed(s). +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. diff --git a/posts/posts-list.org b/posts/posts-list.org index b78f8e9..949d103 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 12:12@@ +- [[file:career/career-list.org][Career List]] @@html:14-05-2026 14:15@@ - [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:11-03-2026 17:18@@ @@html:learning@@ @@html:notes@@ - [[file:career/javascript.org][Understands the Javascript language]] @@html:11-03-2026 16:52@@ @@html:learning@@ @@html:notes@@ - [[file:career/restful-api.org][Restful API]] @@html:15-02-2026 23:00@@ @@html:learning@@ @@html:notes@@ diff --git a/sitemap.org b/sitemap.org index b082557..14b544d 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/life.org][Tag: life]] - [[file:tags/update.org][Tag: update]] - - [[file:tags/insights.org][Tag: insights]] - - [[file:tags/emacs.org][Tag: emacs]] + - [[file:tags/life.org][Tag: life]] - [[file:tags/education.org][Tag: education]] + - [[file:tags/insights.org][Tag: insights]] - [[file:tags/reading.org][Tag: reading]] + - [[file:tags/emacs.org][Tag: emacs]] - [[file:tags/maths.org][Tag: maths]] - posts - [[file:posts/posts-intro.org][Posts Introduction]]