fix error in text edit events