tor-browser

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

inert-node-is-not-highlighted.html (884B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <link rel="match" href="inert-node-is-not-highlighted-ref.html">
      5 <link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees">
      6 <style>
      7 ::backdrop {
      8    display: none;
      9 }
     10 </style>
     11 </head>
     12 <body>
     13 <p>Test that inert nodes are not painted as being selected. The test passes if
     14 none of the text outside the dialog is highlighted when selected.</p>
     15 
     16 <p>Although not shown as selected, the inert nodes are in window.getSelection()
     17 and copied to the clipboard, which is the same behavior as user-select:
     18 none (crbug.com/147490).</p>
     19 
     20 <br>  <!-- Needed to the trigger the bug. -->
     21 This text shouldn't be highlighted as selected.
     22 
     23 <dialog>
     24    <div id="selectable">I'm selectable.</div>
     25 </dialog>
     26 
     27 <script>
     28 dialog = document.querySelector('dialog');
     29 dialog.showModal();
     30 document.execCommand('SelectAll');
     31 </script>
     32 </body>
     33 </html>