@buneeIsSlo
Posted
@hyrongennike, Your solution seems to be working great, where and why do you want to use stopPropagation()
?
@hyrongennike
Posted
@buneeIsSlo Hi no I'm happy with the solution I had a weird bug where clicking on the container would deselect the selected rating couldn't for the life of me figure out why so I just found a workaround but would like to know if I might be missing something.
@buneeIsSlo
Posted
@hyrongennike The workaround you've applied is what I had in mind. This problem arises because you're listening for click events on the container rather than the rating buttons themselves. Speaking of, using an anchor tag as a button doesn't work well in this scenario. I would replace them with actual <button>
tags and add "click" event listeners on each one of them.
If I haven't made myself clear, please use this codepen by Elaine to research and learn.
Hope this helps :)