bigskysoftware / bigskysoftware/htmx

Document Bootstrap integration in 3rd Party Javascript section

Open
#2,212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

On this section https://htmx.org/docs/#3rd-party

It would be very helpful to have a short note about [Bootstrap](https://getbootstrap.com/) integration. Bootstrap remains immensely popular and some challenges must be overcome:
1. Modals -> link to the example https://htmx.org/examples/modal-bootstrap/
2. Also modals: when a modal is already open, then reloaded after validation, the `htmx:after-settle` event should be used instead of `shown.bs.modal` to reinitialize it (say for example focus the first `input`)
3. When swapping with `hx-target="body"` the Bootstrap components (Dropdown, ...) stop working if the Bootstrap JS was included in `body`. Moving the Bootstrap `script` tag to `head` and adding `defer` fixes the issue without any additional code or performance impact.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.