I have a function as below in one of my old application its working fine in Chrome but not working fine in IE 11.I tried a solution "document.getSelection()",but it does mot support moveStart method.Can anybody help me with rewriting the code?
function getCaretPos(element) {
var oSel = document.selection.createRange();
oSel.moveStart('character', -element.value.length);
return oSel.text.length;
}