Open ALJ opened 1 year ago
I have the same issue. Were you able to resolve it?
Can you post a minimal example to replicate the issue?
Are you swapping the body? Any OOB swaps?
So for me this was happening using hx-boost
and swapping the full body, no oob swaps. I guess it might had to do with me not moving all scripts in the head
, which I have read only later about. It over and over added the aos
styles there and the aos
script was in the body.
However, I now changed it to use the multi-swap
extension instead for a more granular swapping experience and everything works like a charm.
Apologies, as it's a bit time-consuming to disentangle it to see when it does and does not occur. I was able to solve my issue locally by moving my <script src="/dist/index.js"></script>
line into the <head>
element; it was previously at the bottom of the <body>
element.
The original problem seems to appear for me when these two are both true:
<script>
tag is in the <body>
rather than the <head>
The problem goes away for me when either:
<script>
tag is<script>
tag is in the <head>
, regardless of how htmx was installed
I'm trying out htmx locally on a simple flat-file site. Everything works well, except I've noticed the htmx-supplied
<style>
tag seem to get duplicated in the<head>
on everyhx-boost
ed link. This problem only occurs for me on versions1.8.6
and above, including the latest1.9.5
.Here's what my head element looks like after clicking boosted links about ten times. Notice the duplicated style tags that have built up:
👉 Thank you so much for making htmx available. It's been great to try a different take on web apps!