title: How can I preserve padding as an element boundary in a contenteditable div?
body: <p>I have an contenteditable div in which I have a span with background and padding.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div contenteditable="true"&gt;
        Blah content &lt;span style="background:#efefef; padding:8px"&gt;my span&lt;/span&gt; and some more content
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, per the above snippet when I move the cursor from the end of <code>content</code> to the beginning of <code>my</code> the caret jumps <strong>inside</strong> the padding (Chrome 80.0.3987.132). </p>
  
  <p>When going the other way backwards, moving the caret from the start of <code>and</code> to the end of <code>span</code>, it respects the padding and does not move inside it.</p>
  
  <p>How can I preserve the padding as a boundary for the element?</p>