kitzo 2.1.14 → 2.1.16

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.
package/README.md CHANGED
@@ -26,7 +26,7 @@ npm i kitzo
26
26
  or
27
27
 
28
28
  ```javascript
29
- <script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.14/dist/kitzo.umd.min.js"></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.16/dist/kitzo.umd.min.js"></script>
30
30
  ```
31
31
 
32
32
  > Vanilla: Attach this script tag in the html head tag and you are good to go.
package/dist/react.esm.js CHANGED
@@ -735,6 +735,20 @@ function useScrollRestoration(path, key, options = {}) {
735
735
  } else {
736
736
  restore();
737
737
  }
738
+ } else {
739
+ if (isWindow) {
740
+ window.scrollTo({
741
+ top: 0,
742
+ left: 0,
743
+ behavior: 'auto'
744
+ });
745
+ } else if (element) {
746
+ element.scrollTo({
747
+ top: 0,
748
+ left: 0,
749
+ behavior: 'auto'
750
+ });
751
+ }
738
752
  }
739
753
  let timeoutId = null;
740
754
  const save = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "A lightweight JavaScript UI micro-library.",
5
5
  "type": "module",
6
6
  "main": "./dist/kitzo.umd.js",