News for hackers. Stuff that matters.
Re:Links are not buttons (2013) by ehnto on Saturday April 10, 2021 @01:18AM (#26759118)
You can, but you can also see how it isn't an elegant solution. What if the user has javascript disabled? Do you also have to capture the click for the space around the interactive spots so a misclick into whitespace doesn't click the link?

It is what is normally done but it isn't perfect.

Re:Links are not buttons (2013) by stevula on Saturday April 10, 2021 @03:48AM (#26759749)
The post I was replying to was specifically lamenting the inability to have interactive elements inside of anchor tags, which I think is solved by event.stopPropagation. If you have a button in an anchor tag and it's not a submit button, you need JS for the button to work anyways.