From e5a78b15717649b3f8903b604e0b7605d4f7459e Mon Sep 17 00:00:00 2001 From: A McIlwraith Date: Sat, 28 Mar 2026 11:02:21 -0400 Subject: [PATCH] [tabs] Fixed push state to push the full url from the pathname on. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With pushState is being called with the hash string only (e.g., "#tab:...") as the URL argument — when the second arg (title) is "" and third arg is a URL that starts with "#", some browsers and environments treat that as a full URL replacement and strip the path. --- src/pg/patterns/core/tabs/_tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg/patterns/core/tabs/_tabs.js b/src/pg/patterns/core/tabs/_tabs.js index 13d4f60..46a5859 100644 --- a/src/pg/patterns/core/tabs/_tabs.js +++ b/src/pg/patterns/core/tabs/_tabs.js @@ -1,4 +1,4 @@ -/* DS2 core (c) 2024–2026 Alexander McIlwraith +/* DS2 core (c) 2024-2026 Alexander McIlwraith Released under Creative Commons Attribution-ShareAlike 4.0 International */ @@ -154,7 +154,7 @@ export function init(container = document, spacer = true) { window.history.pushState( { tab: tabId }, "", - hash + `${location.pathname}${location.search}${hash}` ); pushStateCount++;