diff --git a/vendor/assets/javascripts/prototype_ujs.js b/vendor/assets/javascripts/prototype_ujs.js index 2cd1220..afc0130 100644 --- a/vendor/assets/javascripts/prototype_ujs.js +++ b/vendor/assets/javascripts/prototype_ujs.js @@ -161,7 +161,12 @@ } }); - document.on("click", "form input[type=submit], form button[type=submit], form button:not([type])", function(event, button) { + document.on("click", "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])", function(event, button) { + if (!allowAction(button)){ + event.stop(); + return false; + } + // register the pressed submit button event.findElement('form').store('rails:submit-button', button.name || false); });