HTML.Link confirm option never blocks redirection?

I have an issue in my phoenix templates: whenever I try to use the confirm option for links in my app, such as:

<%= link to: admin_post_comment_path(@conn, :delete, @post, comment), method: :delete, data: [confirm: "Are you sure?"] do %>
                     <%= gettext "Delete" %>
                    <% end %>

I see the confirm window flashing but the request goes through, skipping the confirmation. Also, in this case, it does not do a DELETE but a simple GET on the path. If I remove the confirm, the deletion goes through without any issue.

Anybody has an idea of how to fix this? Thanks!

Make sure the phoenix_html js is included in your bundle and not skipped due to some js errors.

Thanks for lending a hand!

phoenix_html seems to be loaded without any errors.