ilyashubin / scrollbooster

Enjoyable content drag-to-scroll library
https://ilyashubin.github.io/scrollbooster
MIT License
987 stars 81 forks source link

Pass arg to onClick option function for if the click event was prevented #36

Closed joshdavenport closed 4 years ago

joshdavenport commented 4 years ago

Might be better to include in the state object somehow

ilyashubin commented 4 years ago

Неllo! Event object has defaultPrevented property that you can use, I believe it will work for this case? https://developer.mozilla.org/en-US/docs/Web/API/Event/defaultPrevented

joshdavenport commented 4 years ago

Ah, yes that's cool, didn't actually know that was a thing! Nice one, thanks for the advice.