More to learn about Carets

Caret position queries are just horrible I can’t believe browsers make this so hard.

the latest thing I didn’t know is the caret position index (a number) doesn’t necessarily change value when a caret moves.

if there’s a two line textbox and the caret is bottom left (ie, 2nd line just left of the first letter) and you hit ‘left’ then it will move the caret to the end of the 1st line but it will have the same caret position index