[TextEditor] Fixed coordinate calculation bug.