bigskysoftware / bigskysoftware/htmx-extensions
[BUG] Swapping elements via websocket doesn't trigger transitions
- Dominant language
- JavaScript
- Stars
- 284
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
Sending `
` over a websocket does not trigger the transition. If, however, you perform a hx-get request and perform oob-swap with the exact same HTML swap it does show the transition.I had a look through both the WebSocket extension and the base HTMX library but as I'm no expert in JavaScript i couldn't find anything.
Using HTMX: https://unpkg.com/htmx.org@2.0.1
Using websocket extension: https://unpkg.com/htmx.org@1.9.12/dist/ext/ws.js
Doesn't matter if I use "hx-swap" attribute to set a transition either. Tested on both Firefox and Chromium.
Contributor guide
Research direction
Reproduce the difference between the hx-get out-of-band swap and the websocket swap using the versions in the report. Start with the websocket extension entry point at dist/ext/ws.js and compare its swap path with the base HTMX transition handling. Done means the identical hx-swap-oob HTML sent over websocket triggers the transition in Firefox and Chromium.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100