Set the caret position always to end in contenteditable div [duplicate]
问题 This question already has answers here : How to move cursor to end of contenteditable entity (6 answers) contenteditable, set caret at the end of the text (cross-browser) (3 answers) Closed 5 years ago . In my project, I am trying to set the caret position always to the end of the text. I know this is default behaviour but when we add some text dynamically, then the caret position changes to starting point in Chrome and firefox (IE is fine, amazing). Anyway to make it to work properly in