moved foreignEventHandle in onRemoteTextChange()