add an external function to clear the text selection