tor-browser

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

bug1524266-4.html (891B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3 <title>Can delete non-editable content in an editor</title>
      4 <script src="/tests/SimpleTest/EventUtils.js"></script>
      5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6 <style>
      7  div:focus {
      8    outline: 3px solid blue;
      9  }
     10 </style>
     11 <div contenteditable="true" spellcheck="false">
     12  xx
     13  <span contenteditable="false">NOT EDITABLE</span>xxx
     14 </div>
     15 <script>
     16 SimpleTest.waitForFocus(function() {
     17  document.querySelector('[contenteditable="true"]').focus();
     18  requestAnimationFrame(function() {
     19    // Move after the two x
     20    for (let i = 0; i < 2; ++i)
     21      synthesizeKey("KEY_ArrowRight");
     22    // Select whitespace + <span>
     23    for (let i = 0; i < 2; ++i)
     24      synthesizeKey("KEY_ArrowRight", { shiftKey: true });
     25    // Rip it off.
     26    synthesizeKey("KEY_Delete");
     27    document.documentElement.removeAttribute("class");
     28  });
     29 });
     30 </script>