tor-browser

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

bug1670531-3.html (801B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3 <title>Select 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<img contenteditable="false" src="image_rgrg-256x256.png">xxx
     13 </div>
     14 <script>
     15 SimpleTest.waitForFocus(function() {
     16  document.querySelector('[contenteditable="true"]').focus();
     17  requestAnimationFrame(function() {
     18    // Move after the two x
     19    for (let i = 0; i < 2; ++i) {
     20      synthesizeKey("KEY_ArrowRight");
     21    }
     22    // Select <img>
     23    synthesizeKey("KEY_ArrowRight", { shiftKey: true });
     24    document.documentElement.removeAttribute("class");
     25  });
     26 });
     27 </script>