tor-browser

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

touch_iframe_child.html (612B)


      1 <!doctype html>
      2 <script>
      3  "use strict";
      4  for (const type of ["mousedown", "mousemove", "mouseup",
      5                      "touchstart", "touchmove", "touchend",
      6                      "pointerdown", "pointermove", "pointerup",
      7                      "click", "dblclick", "contextmenu"]) {
      8    document.addEventListener(type, ev => {
      9      window.top.postMessage({ from: location.origin, type: ev.type }, "*");
     10      // Workaround for Bug 1976659: First click after contextmenu event is ignored with touch simulation
     11      if (ev.type === "contextmenu") {
     12        ev.preventDefault();
     13      }
     14    });
     15  }
     16 </script>