I am struggling to find a Javascript event for when the user highlights paragraph text on a web page with the mouse. Once the text is highlighted, I can get to it with window.getSelection()
.
This is not about trapping events within an <input type="text">
or <textarea>
, that is easy.
I'm interested in when the user highlights text that would be controlled with the CSS user-select: all;
or user-select: none;
.
Bonus for a jQuery answer. ;-)