Skip to content

Commit c1b4101

Browse files
committed
re-prep 1.9.7 release
1 parent f2d776c commit c1b4101

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* `next` and `previous` are now valid _extended CSS_ symbols in htmx
1111
* The `htmx:beforeHistoryUpdate` event was added
1212
* Properly ignore the `dialog` formmethod on buttons when resolving the HTTP method to use
13+
* Added a `htmx.config.scrollIntoViewOnBoost` option that may be set to `false` to disable scrolling the top of the
14+
body into view for boosted elements
1315

1416
## [1.9.6] - 2023-09-22
1517

dist/htmx.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ return (function () {
7474
getCacheBusterParam: false,
7575
globalViewTransitions: false,
7676
methodsThatUseUrlParams: ["get"],
77-
selfRequestsOnly: false
77+
selfRequestsOnly: false,
78+
scrollIntoViewOnBoost: true
7879
},
7980
parseInterval:parseInterval,
8081
_:internalEval,
@@ -2665,7 +2666,7 @@ return (function () {
26652666
"swapDelay" : htmx.config.defaultSwapDelay,
26662667
"settleDelay" : htmx.config.defaultSettleDelay
26672668
}
2668-
if (getInternalData(elt).boosted && !isAnchorLink(elt)) {
2669+
if (htmx.config.scrollIntoViewOnBoost && getInternalData(elt).boosted && !isAnchorLink(elt)) {
26692670
swapSpec["show"] = "top"
26702671
}
26712672
if (swapInfo) {

dist/htmx.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/htmx.min.js.gz

16 Bytes
Binary file not shown.

www/content/docs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The fastest way to get going with htmx is to load it via a CDN. You can simply a
114114
and get going:
115115

116116
```html
117-
<script src="https://unpkg.com/[email protected]" integrity="sha384-DkR/zjYGLV0eOpkzbCfUJvsiyyYVP7iL/r5p5Fn+GU0VcrTEFbcjrXHgb2HPI718" crossorigin="anonymous"></script>
117+
<script src="https://unpkg.com/[email protected]" integrity="sha384-EAzY246d6BpbWR7sQ8+WEm40J8c3dHFsqC58IgPlh4kMbRRI6P6WA+LA/qGAyAu8" crossorigin="anonymous"></script>
118118
```
119119

120120
While the CDN approach is extremely simple, you may want to consider [not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn).

www/content/posts/2023-11-03-htmx-1.9.7-is-released.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ I'm happy to announce the [1.9.7 release](https://unpkg.com/browse/[email protected].
1919
* `next` and `previous` are now valid _extended CSS_ symbols in htmx
2020
* The `htmx:beforeHistoryUpdate` event was added
2121
* Properly ignore the `dialog` formmethod on buttons when resolving the HTTP method to use
22+
* Added a `htmx.config.scrollIntoViewOnBoost` option that may be set to `false` to disable scrolling the top of the
23+
body into view for boosted elements
2224

2325
Thank you to everyone who contributed, and enjoy!

www/static/src/htmx.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ return (function () {
7474
getCacheBusterParam: false,
7575
globalViewTransitions: false,
7676
methodsThatUseUrlParams: ["get"],
77-
selfRequestsOnly: false
77+
selfRequestsOnly: false,
78+
scrollIntoViewOnBoost: true
7879
},
7980
parseInterval:parseInterval,
8081
_:internalEval,
@@ -2665,7 +2666,7 @@ return (function () {
26652666
"swapDelay" : htmx.config.defaultSwapDelay,
26662667
"settleDelay" : htmx.config.defaultSettleDelay
26672668
}
2668-
if (getInternalData(elt).boosted && !isAnchorLink(elt)) {
2669+
if (htmx.config.scrollIntoViewOnBoost && getInternalData(elt).boosted && !isAnchorLink(elt)) {
26692670
swapSpec["show"] = "top"
26702671
}
26712672
if (swapInfo) {

0 commit comments

Comments
 (0)