no enviar el formulario con enter
This commit is contained in:
parent
034850c8fe
commit
1219bd2ff1
1 changed files with 7 additions and 0 deletions
|
@ -1,4 +1,11 @@
|
|||
$(document).on('turbolinks:load', function() {
|
||||
$(document).on('keypress', ':input:not(textarea):not([type=submit])', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
|
||||
$('#submit-post').click(function(e) {
|
||||
var form = $(this).parents('form.form');
|
||||
|
||||
|
|
Loading…
Reference in a new issue