JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>Go to the store</li>
<li>Pick up dinner</li>
<li>Debug crash</li>
<li>Take a jog</li>
</ul>
<a class="nonselect" href="#">Try to click the right mouse button here</a>
<br/>
<br/>
<a href="#">And this one who is selectable</a>
<br>
<br>
Try to double click, right click or select on any text element
JavaScript
$('.nonselect, li').on('selectstart', function (event) {
event.preventDefault();
});