Content issue

In this: http://jsfiddle.net/bLHVh/4/ I have a contenteditable div, and whenever you enter it, it replaces 'a' with 'b' as a simple example (of course, it will be useful later ) It works fine until you hit enter, then the div loses focus after every keystroke. Why is this?

+5
source share
1 answer

try it

$("#area").bind('keypress', function(e){
    if(e.which == 13){
        e.preventDefault();
    }
});
+1
source

All Articles