Positions the caret to the position indicated by pos
and extends
the selection, if there is one. If there is no selection, then a
selection is formed where the anchor is at the current caret position
and the caretPosition is moved to pos.
pos | the position |
Diagram: TextInputControl