tor-browser

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

exclude-fixed-position.html (728B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <style>
      5 
      6 body { height: 4000px; margin: 0; }
      7 #fixed, #content { width: 200px; height: 100px; }
      8 #fixed { position: fixed; left: 100px; top: 50px; }
      9 #before { height: 50px; }
     10 #content { margin-top: 100px; }
     11 
     12 </style>
     13 <div id="fixed">fixed</div>
     14 <div id="before"></div>
     15 <div id="content">content</div>
     16 <script>
     17 
     18 // Tests that the anchor selection algorithm skips fixed-positioned elements.
     19 
     20 test(() => {
     21  document.scrollingElement.scrollTop = 100;
     22  document.querySelector("#before").style.height = "100px";
     23  assert_equals(document.scrollingElement.scrollTop, 150);
     24 }, "Fixed-position header.");
     25 
     26 </script>