Closed nakorndev closed 4 months ago
You cannot nest <a>
elements this way per browser HTML behaviour. The browser is "auto-fixing" this so that the to <a>
elements are separately clickable, hence the markup is changed. If you inspect the network request and see what Astro responded, it's the same markup as you've written, and then the browser changes it.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Edge
Describe the Bug
I encountered an unusual issue in the Astro project. When I add an element within the map() function, the nested element appears in the wrong place. I’ve provided a reproduction on StackBlitz along with an image capture. If I uncomment a specific line, the issue becomes evident.
This is image working as expected (Commented).
And this is image nested element appears incorrect place.
What's the expected result?
The nested on
<a>
should be appears as parent. Not in the bug as the reproduction.Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-epzfba?file=src%2Fpages%2Findex.astro
Participation