From 617ddc1fd96fff3276151937421406d22ca36cd3 Mon Sep 17 00:00:00 2001 From: Andrea Amantini Date: Mon, 11 Sep 2023 15:08:37 +0200 Subject: [PATCH] Do not handle clicks on ToC links with default handler --- src/nextjournal/clerk/render/navbar.cljs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nextjournal/clerk/render/navbar.cljs b/src/nextjournal/clerk/render/navbar.cljs index 183bd789b..3dada1142 100644 --- a/src/nextjournal/clerk/render/navbar.cljs +++ b/src/nextjournal/clerk/render/navbar.cljs @@ -40,6 +40,7 @@ [_ hash] (some-> search (.split "#"))] (when (or (and search hash (= path-name current-path-name)) anchor-only?) (let [anchor (if anchor-only? path-name (str "#" hash))] + (.stopPropagation event) (.preventDefault event) (when set-hash? (.pushState js/history #js {} "" anchor))