Skip to content

Commit

Permalink
re-prep 1.9.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Nov 4, 2023
1 parent f2d776c commit c1b4101
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* `next` and `previous` are now valid _extended CSS_ symbols in htmx
* The `htmx:beforeHistoryUpdate` event was added
* Properly ignore the `dialog` formmethod on buttons when resolving the HTTP method to use
* Added a `htmx.config.scrollIntoViewOnBoost` option that may be set to `false` to disable scrolling the top of the
body into view for boosted elements

## [1.9.6] - 2023-09-22

Expand Down
5 changes: 3 additions & 2 deletions dist/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ return (function () {
getCacheBusterParam: false,
globalViewTransitions: false,
methodsThatUseUrlParams: ["get"],
selfRequestsOnly: false
selfRequestsOnly: false,
scrollIntoViewOnBoost: true
},
parseInterval:parseInterval,
_:internalEval,
Expand Down Expand Up @@ -2665,7 +2666,7 @@ return (function () {
"swapDelay" : htmx.config.defaultSwapDelay,
"settleDelay" : htmx.config.defaultSettleDelay
}
if (getInternalData(elt).boosted && !isAnchorLink(elt)) {
if (htmx.config.scrollIntoViewOnBoost && getInternalData(elt).boosted && !isAnchorLink(elt)) {
swapSpec["show"] = "top"
}
if (swapInfo) {
Expand Down
2 changes: 1 addition & 1 deletion dist/htmx.min.js

Large diffs are not rendered by default.

Binary file modified dist/htmx.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion www/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The fastest way to get going with htmx is to load it via a CDN. You can simply a
and get going:

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

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).
Expand Down
2 changes: 2 additions & 0 deletions www/content/posts/2023-11-03-htmx-1.9.7-is-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ I'm happy to announce the [1.9.7 release](https://unpkg.com/browse/[email protected].
* `next` and `previous` are now valid _extended CSS_ symbols in htmx
* The `htmx:beforeHistoryUpdate` event was added
* Properly ignore the `dialog` formmethod on buttons when resolving the HTTP method to use
* Added a `htmx.config.scrollIntoViewOnBoost` option that may be set to `false` to disable scrolling the top of the
body into view for boosted elements

Thank you to everyone who contributed, and enjoy!
5 changes: 3 additions & 2 deletions www/static/src/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ return (function () {
getCacheBusterParam: false,
globalViewTransitions: false,
methodsThatUseUrlParams: ["get"],
selfRequestsOnly: false
selfRequestsOnly: false,
scrollIntoViewOnBoost: true
},
parseInterval:parseInterval,
_:internalEval,
Expand Down Expand Up @@ -2665,7 +2666,7 @@ return (function () {
"swapDelay" : htmx.config.defaultSwapDelay,
"settleDelay" : htmx.config.defaultSettleDelay
}
if (getInternalData(elt).boosted && !isAnchorLink(elt)) {
if (htmx.config.scrollIntoViewOnBoost && getInternalData(elt).boosted && !isAnchorLink(elt)) {
swapSpec["show"] = "top"
}
if (swapInfo) {
Expand Down

0 comments on commit c1b4101

Please sign in to comment.