I am making my portfolio website using AstroJS with Typescript and TailwindCSS. I was making some "Read More ..." tags for navigation and I noticed an odd interaction with umami click events.
Whenever I had different a tags (even with different hrefs) that I had in the same page, they would redirect to the first tag. (Clicking the first one redirects to /blog just fine, but clicking on the second one redirects into /blog instead of /works). I think what is happening is that the event listener for the first instance of the a tag is overwriting the href redirects of the succeeding a tags.
I'm not sure if the initial problem was an error in my part or a bug with Umami. My use-case doesn't necessarily need to have the same event names for the a tags, but any help or clarification regarding this matter is appreciated. Thanks!
I am making my portfolio website using AstroJS with Typescript and TailwindCSS. I was making some "Read More ..." tags for navigation and I noticed an odd interaction with umami click events.
*the
rel="prefetch"
is related to the @astrojs/prefetch integrationProblem
Whenever I had different a tags (even with different hrefs) that I had in the same page, they would redirect to the first tag. (Clicking the first one redirects to
/blog
just fine, but clicking on the second one redirects into/blog
instead of/works
). I think what is happening is that the event listener for the first instance of the a tag is overwriting the href redirects of the succeeding a tags.Solution
I was able to avoid this problem by using unique event names for each of the a tags.
I'm not sure if the initial problem was an error in my part or a bug with Umami. My use-case doesn't necessarily need to have the same event names for the a tags, but any help or clarification regarding this matter is appreciated. Thanks!