I wrote a script that trigger a submit button when i press enter key in a textarea, the TextArea returns to the line before the submit is activated.
I want to obstruct the TextArea to not return to the line
there is my script
jQuery( "#div1" ).on( "keydown", function(event) {
if(event.which == 13){
if(document.getElementById('checkbox').checked){
jQuery("#envoyer").trigger('click');
}
}
});