Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it.
I am trying to write an input masking utility, and everything works fine as long as the caret position is at the end of the input. If the user tries to edit in the middle, the caret gets moved to the end of the input.
var pos = document.activeElement.selectionStart; ... document.activeElement.setSelectionRange(pos,pos);
But in Lightning Locker, activeElement is the lightning:input node and not the actual input, as such selectionStart is undefined.
From the onchange event, how can I get to the changed HTMLInputElement so I can call selectionStart and get the current caret position?