assets/js/romo/form.js in romo-0.8.0 vs assets/js/romo/form.js in romo-0.9.0
- old
+ new
@@ -63,14 +63,16 @@
}
}
RomoForm.prototype.onFormKeyPress = function(e) {
- var target = $(e.target);
+ if (this.elem.data('romo-form-disable-keypress') !== true) {
+ var target = $(e.target);
- if(target.is(':not(TEXTAREA)') && e.keyCode === 13 /* Enter */) {
- e.preventDefault();
- this.onSubmitClick();
+ if (target.is(':not(TEXTAREA)') && e.keyCode === 13 /* Enter */) {
+ e.preventDefault();
+ this.onSubmitClick();
+ }
}
}
RomoForm.prototype.onSubmitClick = function(e) {
if (e !== undefined) {