tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

interlinePosition-after-Selection-addRange-ref.html (640B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>Selection.addRange() should always reset interline position</title>
      5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6 <style>
      7  div[contenteditable] {
      8    padding: 1em;
      9  }
     10 </style>
     11 <script>
     12 SimpleTest.waitForFocus(async () => {
     13  const editingHost = document.querySelector("div[contenteditable]");
     14  editingHost.focus();
     15  getSelection().collapse(editingHost, 2);
     16  SpecialPowers.wrap(getSelection()).interlinePosition = true;
     17  document.documentElement.removeAttribute("class");
     18 });
     19 </script>
     20 <div contenteditable="true" spellcheck="false">abc<br><br></div>