-
-
Notifications
You must be signed in to change notification settings - Fork 9
svg title used as document title after refreshing sprig component #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As you correctly pointed out this is an issue with htmx which seems like it was fixed in bigskysoftware/htmx#459. Are you running the latest version of Sprig and loading htmx 1.5.0? |
I just updated to Sprig 1.8 which is loading htmx 1.5.0 but still seeing this issue |
Can you show me the output of using the SVG function? Craft doesn't add the title, so it is probably embedded in your SVG file. |
Hi I just double checked the SVG Files and the output. This is the SVG file:
This is the output of
We can mitigate this issue by removing |
Thanks, I've created an issue specifically for this at bigskysoftware/htmx#576. |
@bencroker is this fix likely to be rolled out soon? |
I believe it was released in htmx 1.6.0, which Sprig 1.9.0 requires. |
In that case I'm still seeing the same issue or similar if not the same. Whereby the page title changes to that of the first svg on the page. I'll write this up in more detail tomorrow. @aloco can you confirm if you still see the same issue? Or if resolved? |
Can you double check what version of htmx is being loaded into the page? |
Hi Ben. Yes, you are right. htmx 1.6.0 and sprig 1.9.0 fixes this. Thank you. |
Question
Hi Ben.
When using an inline svg within a sprig component, the title of the document gets overwritten by the svg´s title. We are using craft´s
svg
function and setting a title there. https://craftcms.com/docs/3.x/dev/functions.html#svgIt seems like htmx is looking for
title
inselectAndSwap
and picks the title from the svg as document title.Thanks for your advice
Additional context
you can reproduce this by using a svg with title in a sprig component like this
The text was updated successfully, but these errors were encountered: