The caretPositionFromPoint/caretRangeFromPoint is returning the end of the line above it instead of the beginning of line(first character position) whe
caretPositionFromPoint
caretRangeFromPoint