assets/js/romo/form.js in romo-0.20.3 vs assets/js/romo/form.js in romo-0.20.4

- old
+ new

@@ -209,10 +209,15 @@ // event functions RomoForm.prototype.romoEvFn._onSubmitClick = function(e) { e.preventDefault(); - var submitElem = e.target; + var submitElem; + if (Romo.is(e.target, '[data-romo-form-submit]')) { + submitElem = e.target; + } else { + submitElem = Romo.closest(e.target, '[data-romo-form-submit]'); + } if (!Romo.hasClass(submitElem, 'disabled')) { if (Romo.data(submitElem, 'romo-form-submit') === 'confirm') { Romo.trigger(this.elem, 'romoForm:confirmSubmit', [this]); } else { this.doSubmit();