4

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) the confirm pops up but it doesn't wait for the end user to click on the Yes or Cancel buttons and it automatically confirms. In the case that I have, it deletes the user.

This does not happen in Chrome.

Is there a workaround for this bug or should I be coding it differently?

Thanks

4

1 回答 1

0

大约一年前我遇到了这个问题。JQuery 中有一个错误。确保您安装了最新的 JQuery gem。但是,它在 Windows 下的 Firefox 中。

于 2013-07-05T12:14:09.203 回答