[tabs] Fixed push state to push the full url from the pathname on.

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.
This commit is contained in:
2026-03-28 11:02:21 -04:00
committed by Alexander
parent a4fc62ca5c
commit ac427fbbce

View File

@@ -1,4 +1,4 @@
/* DS2 core (c) 20242026 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++;