Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jacobq
Copy link
Contributor

@jacobq jacobq commented Mar 11, 2022

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
Copy link
Contributor Author

jacobq commented May 26, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant