diff --git a/shared/static/scripts/sx-browser.js b/shared/static/scripts/sx-browser.js index 64b8fcd..fbd46a2 100644 --- a/shared/static/scripts/sx-browser.js +++ b/shared/static/scripts/sx-browser.js @@ -14,7 +14,7 @@ // ========================================================================= var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } }); - var SX_VERSION = "2026-03-07T00:33:33Z"; + var SX_VERSION = "2026-03-07T00:46:09Z"; function isNil(x) { return x === NIL || x === null || x === undefined; } function isSxTruthy(x) { return x !== false && !isNil(x); } @@ -3137,7 +3137,10 @@ callExpr.push(dictGet(kwargs, k)); } } link.addEventListener("click", function(e) { e.preventDefault(); var pathname = urlPathname(href); - if (tryClientRoute(pathname)) { + // Find the sx-boost target selector from the link's ancestor + var boostEl = link.closest("[sx-boost]"); + var targetSel = boostEl ? boostEl.getAttribute("sx-boost") : null; + if (tryClientRoute(pathname, targetSel)) { try { history.pushState({ sxUrl: href, scrollY: window.scrollY }, "", href); } catch (err) {} if (typeof window !== "undefined") window.scrollTo(0, 0); } else { diff --git a/shared/sx/ref/bootstrap_js.py b/shared/sx/ref/bootstrap_js.py index d87bc97..4d9595a 100644 --- a/shared/sx/ref/bootstrap_js.py +++ b/shared/sx/ref/bootstrap_js.py @@ -2616,7 +2616,10 @@ PLATFORM_ORCHESTRATION_JS = """ link.addEventListener("click", function(e) { e.preventDefault(); var pathname = urlPathname(href); - if (tryClientRoute(pathname)) { + // Find the sx-boost target selector from the link's ancestor + var boostEl = link.closest("[sx-boost]"); + var targetSel = boostEl ? boostEl.getAttribute("sx-boost") : null; + if (tryClientRoute(pathname, targetSel)) { try { history.pushState({ sxUrl: href, scrollY: window.scrollY }, "", href); } catch (err) {} if (typeof window !== "undefined") window.scrollTo(0, 0); } else {