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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -