When I click to remove product from mini-cart a confirm dialog pops up with "Cancel" or "Ok", if I click on "Cancel" the product still gets removed.
Any idea why and how to fix it?
This is the
a element to remove product from mini-cart:
<a href="long_delete_url_here" title="Remove This Item" onclick="return confirm('Are you sure you would like to remove this item from the shopping cart?');" class="btn-remove">Remove This Item</a>
No errors in console, tried adding custom jquery function, adding preventDefault, but nothing. Even just adding
onclick="return false;" doesn't do anything.
I did a small test and added
onclick="return false;" to different elements like buttons and links in different templates, but the buttons and links still work after clicking on them. Any idea what could be wrong?