mansona / ember-cli-notifications

⚛ Atom inspired notification messages for ember-cli
https://ember-cli-notifications.netlify.app/
MIT License
177 stars 94 forks source link

fix: don't consume clicks when no onClick given (fix #274) #337

Open jacobq opened 2 years ago

jacobq commented 2 years ago

To avoid the problems described in #269 and #274 (that #270 was supposed to fix) this PR proposes making the handleOnClick function inert when @onClick is not provided.

Demo: https://github.com/jacobq/ecm-clickProblem

jacobq commented 2 years ago

Alternatively, the event could be passed to the onClick handler so that the consumer can decide whether to preventDefault, stopPropagation, etc. as needed.