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 +1 -1
- package/dist/react.esm.js +14 -0
- package/package.json +1 -1
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.
|
|
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 = () => {
|