I need the coordinates in pixels of the beginning of the text selection (anywhere on the page, not in a textarea).
I tried using the cursor coordinates but this didn't work quite well because the cursor coordinates and the beginning of the selection are not always the same (for example when a user drags over a text).
I hope someone has the solution!