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

Prevent default action when an event handler returns false #162

Merged
merged 3 commits into from
Feb 7, 2020

Conversation

SimoTod
Copy link
Collaborator

@SimoTod SimoTod commented Feb 4, 2020

Closes #150
It emulates the native behaviour so @click="return confirm('...')" will stop the default action but `@click="confirm('...')" won't.

https://codepen.io/SimoTod/pen/gOpYoBQ

@calebporzio
Copy link
Collaborator

Great! Thanks!

@calebporzio calebporzio merged commit 0769eca into alpinejs:master Feb 7, 2020
@SimoTod SimoTod deleted the feature/event-return-value branch November 20, 2021 00:25
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.

[Bug?] Javascript confirm dialog cancel not working
2 participants