-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
confirmDelete issue #162
Comments
Update: it works if you use the icon AND a text but doesn't work if we use just an icon the the a tag. |
It seems that there is a bug when clicking an icon; the click action triggers on the icon itself rather than the
<a href="{{ route('users.destroy', $user->id) }}" class="btn btn-danger" data-confirm-delete="true">
<i data-confirm-delete="true" class="fa fa-fw fa-times"></i>
</a>
Before: form.action = event.target.href; After: form.action = event.target.closest('a').href; This change is necessary because when you click on the icon, the code searches for the After making this change, it should work. While there might be a better solution, at least this workaround does the job. |
It works fine. Thanks @thobiasvicente |
Description: In a certain scenario, a click on the button doesn't trigger the confirmation dialog. If we replace Delete with let's say an icon, it stops working and just redirects the user to route('users.destroy', $user->id)
Steps To Reproduce: Just replace
<a href="{{ route('users.destroy', $user->id) }}" class="btn btn-danger" data-confirm-delete="true">Delete</a>
with
<a href="{{ route('users.destroy', $user->id) }}" class="btn btn-danger" data-confirm-delete="true"><i class="fa fa-fw fa-times"></i></a>
The text was updated successfully, but these errors were encountered: