htmx icon indicating copy to clipboard operation
htmx copied to clipboard

preloaded places `htmx-request` class on `body`

Open Hades32 opened this issue 1 year ago • 13 comments

Thanks for this fantastic piece of software!

I found a minor issue. When triggering preloading (by hovering) of some element, some other elements on my page suddenly got a new style. I found this was because preload places the htmx-request class on body. Probably this is the culprit, as it doesn't set anything. (Or the code that interprets undefined as body of course) https://github.com/bigskysoftware/htmx/blob/d766c14aa6aead788519fdf037f8c6387106c460/src/ext/preload.js#L51-L53

IMO it shouldn't place the class at all, but if it must, then it should be on the element that triggered it

Hades32 avatar May 16 '23 15:05 Hades32