Open aral opened 4 months ago
So the fix for this that I implemented in my fork of htmx-2 (which has the hx-swap-oob normalisation PR merged in so it differs from current htmx-2 a bit), was essentially to special-case idiomorph:
(!swapStyle.startsWith('morph:') && swapStyle.indexOf(':') > 0)
at the equivalent of the following line:
This leaves the selector alone and allows it to be parsed properly by idiomorph.
Not making a pull request for this at the moment as it would make more sense to wait for https://github.com/bigskysoftware/htmx/issues/2308 to be resolved and then do so.
You can see the change in my fork of htmx-2 at: https://codeberg.org/kitten/app/commit/5ee6bf76393445fa8b3fb68295430402b75ae0e1
The issue with
hx-swap
properties not being available inhx-swap-oob
(https://github.com/bigskysoftware/htmx/issues/2308) also affects idiomorph.Specifically, the following syntax cannot be used:
Use case: I was just trying to make a markdown preview updated via WebSocket scroll into view to show the latest change after the content has been morphed and I can’t.