At.js icon indicating copy to clipboard operation
At.js copied to clipboard

Right arrow key jumps to end of line in contentEditable on WebKit browsers

Open laurenbarker opened this issue 10 years ago • 1 comments

There seems to be some odd behavior when using the arrow keys to navigate around inserted span elements on WebKit browsers. When using the arrow keys, the expected behavior would be that the cursor would jump to the beginning and end of the inserted element instead of to the beginning of the element and to the end of the line. To reproduce on the demo:

  1. insert an emoji/mention
  2. add some text after the emoji/mention
  3. navigate to before the emoji/mention on the same line
  4. use the right arrow key to navigate along the line and over the inserted emoji/mention at js_bug

From what I can tell the &nbsp after the span element is used as a marker for the end of the inserted element but the &nbsp is replaced if the user enters any text after the element. screen shot 2016-04-14 at 4 08 28 pm

Thanks for the wonderful library!

laurenbarker avatar Apr 14 '16 20:04 laurenbarker

Having the same problem here. Any updates on this?

ReneS1991 avatar Nov 17 '17 08:11 ReneS1991