When I press and move the mouse on a text selection in the browser, the default behavior is to drag the selected text? How does it work?
Can I add an event listener on the
document.getSelection()
or something like that, if I want to change the default behavior rather than prevent it.Or if there is an event listener registered on the document to handle it, how does the browser check the
dragstart
event's target is the selected text?