tor-browser

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

editing-host-has-only-invisible-br-ref.html (793B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Caret should be rendered in the editing host which has no visible non-anonymous content</title>
      6 <meta name="viewport" content="width=device-width,initial-scale=1">
      7 <style>
      8 div[contenteditable]::after {
      9  content: "placeholder text";
     10 }
     11 </style>
     12 <script>
     13 "use strict";
     14 
     15 addEventListener("load", async () => {
     16  const editingHost = document.querySelector("div[contenteditable]");
     17  document.activeElement?.blur();
     18  const waitForFocus = new Promise(resolve =>
     19    editingHost.addEventListener("focus", resolve, {once: true})
     20  );
     21  editingHost.focus();
     22  await waitForFocus;
     23  document.documentElement.removeAttribute("class");
     24 }, {once: true});
     25 </script>
     26 </head>
     27 <body>
     28 <div contenteditable></div>
     29 </body>
     30 </html>