In this: http://jsfiddle.net/bLHVh/4/ I have a contenteditable div, and whenever you type in it, it replaces 'a' with 'b', just as a simple example (it will do useful stuff later, of course). It works fine until you hit enter, then the div loses focus after every keystroke. Why is this?
try this
$("#area").bind('keypress', function(e){
if(e.which == 13){
e.preventDefault();
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With