I have a contenteditable div on which I control the behavior of some keys. In particular, I have this:
$('#my_contenteditable').on('keydown', function(e) {
// Some code...
if (e.key == 'Enter') {
$(this).blur();
e.preventDefault();
return;
}
// Some more code...
});
But after I blured the element, when I press Enter again, Chrome wants to re-focus it.
Can I prevent this behavior?