Fix Text Cursor Invalid Issue.