JSFiddle - React, Tailwind, and code Playground

HTML

<div id="scrollable">
  <div contenteditable=true>
    <p>Editable with parent with scrolling</p>
    <p><br></p>
    <p><br></p>
    <p><br></p>
    <p><br></p>
    <p><br></p>
  </div>
  <div id="overlay">
  </div>
</div>

CSS

#scrollable{
  width: 300px;
  height: 100px;
  overflow: auto;
  background-color: rgba(0,0,255,0.1);
}

#overlay {
  width: 100%;
  height: 100%;
  background-color: rgba(255,0,0,0.1);
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}