10

Possible Duplicate:
How to move cursor to end of contenteditable entity

How do I move the cursor to the end of a contenteditable div? I only need a solution that works in webkit, I dont care about ie or ff here. The shorter, the better. :-)

Community
  • 1
  • 1
Leticia Meyer
  • 103
  • 1
  • 1
  • 4
  • Yes, but the accepted answer doesn't work for contenteditable divs, which is what my question is about – Leticia Meyer Aug 09 '11 at 03:00
  • Welcome to SO @Leticia. Does the second answer for the above Q answer your question: http://stackoverflow.com/questions/1125292/how-to-move-cursor-to-end-of-contenteditable-entity/3866442#3866442 – Jason Gennaro Aug 09 '11 at 03:10

1 Answers1

5

The first answer you looked at will work for a textarea, but not for a contenteditable element.

This solution is for moving the caret to the end of a contenteditable element.

How to move cursor to end of contenteditable entity

Community
  • 1
  • 1
Jason Gennaro
  • 34,535
  • 8
  • 65
  • 86