-
Hello. I'm trying to use alpinejs v3 to implement a confirm dialog for a form. I found this issue. #150 And the solution, PR #162, seems to suggest that we can use <form x-data>
<button @click="return confirm('are you sure')"
</form> to do that. But the above code will make alpinejs throws the Here's a snippet to reproduce the behavior. https://stackblitz.com/edit/js-q1bdjm?file=index.html What is the correct way in alpinejs (v3) to do |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That PR was for Alpine v2. |
Beta Was this translation helpful? Give feedback.
That PR was for Alpine v2.
V3 doesn't support that behaviour anymore, see https://alpinejs.dev/upgrade-guide#no-false-return-from-event-handlers