selectionStart

The selectionStart property of the HTMLInputElement interface is a number that represents the beginning index of the selected text.

MDN Reference