Answer the question
In order to leave comments, you need to log in
How to find cursor position in textarea on dragover event?
When selecting text in a textarea, the position of the cursor and selection can be obtained by reading the textarea.selectionStart, textarea.selectionEnd, and textarea.selectionDirection properties (Figure 1).
Further, if you start dragging the selected text, then in addition to the selection, an additional cursor is displayed indicating the position where the selected fragment will be transferred when the transfer is completed (Fig. 2).
Here is the position of this additional cursor I would like to get from the dragover event.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question