google chrome - Cursor in wrong place in contenteditable -


i have contenteditable div non-editable "islands". working until non-editable part last thing in editable div. in case cursor not right behind non-editable @ end of editable div.

see example borrowed question

here fiddle can try on: http://jsfiddle.net/rysvz/2/ . when delete dot @ end, cursor jump away. behaviour safari , chrome. guess webkit issue.

here code sample:

<div contenteditable="true" class="editor"> sample template <span class="mergecode" contenteditable="false">mergecode1</span>. </div> 

do have idea why happening , how fix it?

i have fixed problem, maybe acceptable too.

&zwnj;<button contenteditable=false>press</button>&zwnj; 

the problem caused caret having no space go if wrap contenteditable divs in 0 width non joining spaces gives caret somewhere go.

jsfiddle


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -