Get caret postion of offset from inputor