JSFiddle - React, Tailwind, and code Playground

HTML

<body id="noselect">
    Скопируй меня <br><br>
    <form action="" method="post">
        <input name="search" type="search" x-webkit-speech placeholder="что ищем?"/>
    </form>
</body>

CSS

body{
    margin:50px;
}

JavaScript

function disableSelection(target)
{ if (typeof target.onselectstart!="undefined")  target.onselectstart=function(){return false}
  else if (typeof target.style.MozUserSelect!="undefined")  target.style.MozUserSelect="none"
  else target.onmousedown=function(){return false} 
  target.style.cursor = "default" 
}
  if (document.getElementById("noselect")) 
{
  disableSelection(document.getElementById("noselect"));
  }