views:

51

answers:

0

I have a contenteditable div which needs to be focussed at pageload (place cursor at the first line).

document.getElementById("editor").focus() works well in Firefox and IE, but in Chrome/Safari it just selects the entire content!

Is there a way to make this work properly?

Thanks in advance,
Shesh