Currently, when I use the following Ruby on Rails code:
= link_to "Confirm", user, confirm: 'Are you sure?', method: :delete, :class => "button"
This produces:
<a class="button" rel="nofollow" data-method="delete" data-confirm="Are you sure?" href="/users/2">Confirm</a>
When I click on this button in Firefox (v8 Mac), a confirmation appears, but does not wait for the end user to click the "Yes" or "Cancel" buttons, and he will automatically confirm. In case I have, it deletes the user.
This does not happen in Chrome.
Is there a workaround for this error, or do I need to code it differently?
thank
source
share