From cd4f1b02b25191959e8c53f7e2ea421cabd65020 Mon Sep 17 00:00:00 2001 From: Peter Mosses <18308236+pdmosses@users.noreply.github.com> Date: Fri, 29 Sep 2023 22:33:15 +0200 Subject: [PATCH] Remove href from the navigation link to the current page (#1356) * Remove href from link to active page * Update CHANGELOG.md Co-authored-by: Matt Wang --------- Co-authored-by: Matt Wang --- CHANGELOG.md | 6 +++++- assets/js/just-the-docs.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fa91a..5247830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,11 @@ This website is built from the `HEAD` of the `main` branch of the theme reposito Code changes to `main` that are *not* in the latest release: -- N/A +### Bugfixes + +- Fixed: remove href from the navigation link to the current page by [@pdmosses] in [#1356] + +[#1356]: https://github.com/just-the-docs/just-the-docs/pull/1356 ## Release v0.6.2 diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index fb924de..2847b79 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -501,6 +501,7 @@ function activateNav() { var target = navLink(); if (target) { target.classList.toggle('active', true); + target.removeAttribute('href'); } while (target) { while (target && !(target.classList && target.classList.contains('nav-list-item'))) {