I want to run some code while user selecting a text. The 'while' is very important. onselect event is fired only after the text has been selected, so it doesn't help much.
Basically I have a situation that a very big message is being shown and it hides part of a paragraph. So I want to hide the message automatically if the user starts to select something in the paragraph.