Clicking on a tag widget opens pop up in all the occurrences of the tag widget

If I use tag widget multiple times in the same tiddler, like this

<<tag filter>>

Example text <<tag filter>>

Notice that I will have multiple tag pills pointing to the same tag, filter.

image

Then clicking on one pill opens up the pop up on both pills.

How do I fix this issue? What’s the reason behind it?

I noticed this affects only the current tiddler. Even if I copy the above text into multiple tiddlers, multiple pop-ups only open up in the current tiddler.

See Use variable="transclusion" in a list widget to get unique popups

1 Like

Thank you @saqimtiaz.

Using @EricShulman’s answer, I added this macro on top of my tiddler and used it instead of tag widget. It fixed the issue.

\define show_tag_pill(i, t) <$let transclusion=$i$><<tag $t$>></$let>