I have a div with contenteditable attribute value set to true. When I paste some text in this contenteditable, I am able to keep the mouse position at the end of the pasted text. When there is a large amount of text pasted, the text may overflow the visible area. Note that width if fixed and the element scrolls in the Y direction.
I am unable to figure how to determine the cursor (not the mouse) Y position post the paste so that I can scroll to that position. It is not necessarily true that the paste will always happen at the end, so scroll to bottom is not going to help out in all cases.
Any hints on this will be appreciated.