JS: remove selected text after mouse double click event