[TextEditor] Fixed possible height tree exception.