Discussion on: Front-end Challenge: Prevent Clicks

entrptaher profile image
Md. Abu Taher 👨‍💻 Author

Thanks for answering. Did you test this on producthunt?

Apparently there are sites (ie: producthunt) where this should not work because not every click event is a click event. Sometimes there are mousedown and other events such as virtual dom based events as well.

silvestricodes profile image
Jonathan Silvestri

Nah, just did a rudimentary test in my console.

Sounds like there would need to be bindings for each event, with associated un-bindings for each event as well. Probably doesn't change my solution too much, just needs to be applied to more things.