jquery-simulate-ext icon indicating copy to clipboard operation
jquery-simulate-ext copied to clipboard

Key-sequence and contenteditable issue

Open dianaprajescu opened this issue 9 years ago • 3 comments

It seems that if you have a <div contenteditable="true"><p>aaaa</p></div> and place the cursor at the beginning of the <p> element (in front of aaaa) and hit the Simulate key-sequence button, the text is not entered in the correct position.

You would expect to have <div contenteditable="true"><p>foobaraaaa</p></div>, instead you get <div contenteditable="true">foobar<p>aaaa</p></div>. Otherwise, if the cursor is anywhere else in the text it works as expected.

I have edited your demo jsfiddle in order for you to be able to test what I'm trying to say: http://jsfiddle.net/Psjhf/721/

Look forward to hearing your opinion on this.

dianaprajescu avatar May 21 '15 11:05 dianaprajescu

hmm.. unfortunately, I don't know much about the way selections work. So I can't tell if this is a bug or expected behavior, i.e. if clicking in front of the aaaa is supposed to create a selection within the <p> element or in front of it. I wonder if recent versions of bililiteRange handle such situations differently. Then #28 might fix this.

j-ulrich avatar May 30 '15 20:05 j-ulrich

Hi @dianaprajescu @j-ulrich ,

I don't believe the #28 solved this issue. Did you get a fix or work around for this issue ?

Looking forward to hear from you.

hiteshdua1 avatar Jul 04 '17 04:07 hiteshdua1

Hi @dianaprajescu and @j-ulrich ,

I have investigated this issue, leads to billilite rage bounds

Further investigation can be found in the logged issue.

https://github.com/dwachss/bililiteRange/issues/17

hiteshdua1 avatar Jul 15 '17 05:07 hiteshdua1