@cagovweb/state-template 6.5.3 → 6.5.5

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.
@@ -1,4 +1,4 @@
1
- var StateTemplateNpmPackageVersion="6.5.3";
1
+ var StateTemplateNpmPackageVersion="6.5.5";
2
2
  /*!
3
3
  * Bootstrap v5.3.8 (https://getbootstrap.com/)
4
4
  * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
@@ -8338,14 +8338,15 @@ window.addEventListener("load", () => {
8338
8338
  }
8339
8339
 
8340
8340
  // Scroll to hash solution
8341
- const hashLocation = window.location;
8342
- if (hashLocation.hash) {
8343
- // Trigger a hashchange to ensure hash scrolling works
8344
- setTimeout(() => {
8345
- const currentHash = hashLocation.hash;
8346
- hashLocation.hash += "_"; // Remove the hash temporarily
8347
- hashLocation.hash = currentHash; // Reapply the hash
8348
- }, 500);
8341
+ if (location.hash) {
8342
+ const target = document.querySelector(location.hash);
8343
+ if (target) {
8344
+ requestAnimationFrame(() => {
8345
+ requestAnimationFrame(() => {
8346
+ target.scrollIntoView({ block: "start" });
8347
+ });
8348
+ });
8349
+ }
8349
8350
  }
8350
8351
  }); // call out the function on the page load
8351
8352