stx-router 0.2.604 → 0.2.605

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client.js +4 -1
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -1244,7 +1244,10 @@ function routerSource() {
1244
1244
 
1245
1245
  if(t.origin!==location.origin){location.href=url;return Promise.resolve(false)}
1246
1246
 
1247
- if(t.pathname===location.pathname&&t.hash&&pushState!=='tab'){
1247
+ // A popstate has already changed location to its destination, while the
1248
+ // outgoing page is still on screen. It must load that page before any
1249
+ // anchor can be used. A changed query also selects different page content.
1250
+ if(pushState!==false&&t.pathname===location.pathname&&t.search===location.search&&t.hash&&pushState!=='tab'){
1248
1251
  if(pushState!==false)writeHistory(pushState,t.href);
1249
1252
  var el=findIn(t.hash);
1250
1253
  if(el)el.scrollIntoView({behavior:'smooth'});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stx-router",
3
3
  "type": "module",
4
- "version": "0.2.604",
4
+ "version": "0.2.605",
5
5
  "description": "File-based router for STX — .stx template discovery, nested layouts, typed route params, middleware, and client-side SPA navigation.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",