JSFiddle - React, Tailwind, and code Playground

HTML

<div style="border: 1px solid black; width: 200px">
    Just select text inside this div spanning several rows with the mouse.
    Watch the selection visually going outside the div box.
    How do you prevent the visual selection to show outside the div?
    You can do that with "overflow:hidden", but is that the way to do it?
</div>

CSS

div { //overflow: hidden; }