javascript - html contenteditable li: new line should be inside current li. Diff Chrome/IE -
i have contenteditable ol li chicldren. when press enter, want new line inside current li. not want start new numbered li. following html acts desired in chrome, not in ie9.
i have jsfiddle http://jsfiddle.net/d8ruh/ (put cursor after , press enter.)
<ol contenteditable="true"> <li> <div>a</div> </li> <li> <div>b</div> </li> </ol>
the result of putting cursor after "a" , pressing enter:
in chrome:
1. (cursor on line) 2. b
in ie9:
1. 2. (cursor on line) 3. b
is there way make them both act chrome, without resorting js , moving dom elements around.
Comments
Post a Comment