htmx-extensions icon indicating copy to clipboard operation
htmx-extensions copied to clipboard

[BUG] Swapping elements via websocket doesn't trigger transitions

Open tpanajott opened this issue 1 year ago • 2 comments

Sending <div hx-swap-oob="true" class="min-h-1 overflow-hidden rounded-t-md w-full transition-all ease-linear duration-500 bg-red-500 dark:bg-red-700" id="panel_header-32"></div> 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/[email protected] Using websocket extension: https://unpkg.com/[email protected]/dist/ext/ws.js

Doesn't matter if I use "hx-swap" attribute to set a transition either. Tested on both Firefox and Chromium.

tpanajott avatar Jul 27 '24 11:07 tpanajott

+1 same issue WS don't work with transition or indicators

hosamhamdy258 avatar Jan 13 '25 05:01 hosamhamdy258