tor-browser

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

indent-in-textarea-in-designMode-during-outdent.html (700B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 </head>
      6 <body>
      7 A
      8 <script>
      9 addEventListener("load", () => {
     10  const textarea = document.querySelector("textarea");
     11  textarea.addEventListener("focusin", onFocusIn);
     12  textarea.select();
     13  document.execCommand("outdent");
     14 });
     15 
     16 function onFocusIn() {
     17  document.querySelector("marquee").onstart = () => {
     18    document.designMode = "off";
     19    window.find("AA");
     20  };
     21  document.designMode = "on";
     22  document.execCommand("selectAll");
     23  document.execCommand("indent");
     24  document.designMode = "on";
     25 }
     26 </script>
     27 <fieldset>
     28 <textarea></textarea>
     29 AA
     30 </fieldset>
     31 <marquee id="b"></marquee>
     32 <blockquote contenteditable="true"></blockquote>
     33 </body>
     34 </html>