5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:31:41 +00:00

no enviar el formulario con enter

This commit is contained in:
f 2018-06-25 17:36:10 -03:00
parent 034850c8fe
commit 1219bd2ff1
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -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');