aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2023-05-11 08:43:39 +0000
committers-ol <s+removethis@s-ol.nu>2023-05-11 08:43:39 +0000
commitc609e66826d3bf2c0f4e1e9caec488a297dd36f1 (patch)
tree6395cf4366be4b089049482984b4d187a3a50be9
parentfix(requirements.sim.txt): add websockets (diff)
downloadfirmware-c609e66826d3bf2c0f4e1e9caec488a297dd36f1.tar.gz
firmware-c609e66826d3bf2c0f4e1e9caec488a297dd36f1.zip
simulator: remove context menu, outlines, etc in multitouch chrome
-rw-r--r--hex33board/boards/simulator.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/hex33board/boards/simulator.py b/hex33board/boards/simulator.py
index c4e446e..e7f073a 100644
--- a/hex33board/boards/simulator.py
+++ b/hex33board/boards/simulator.py
@@ -209,6 +209,8 @@ def HTTPHandler(board):
width: 100%;
height: calc(100vh - 4rem);
touch-action: none;
+ user-select: none;
+ -webkit-tap-highlight-color: transparent;
}
</style>
</head>
@@ -227,9 +229,12 @@ def HTTPHandler(board):
const blockTouch = (e) => {
e.preventDefault();
+ e.stopPropagation();
};
svg.ontouchstart = blockTouch;
+ svg.ontouchend = blockTouch;
svg.ontouchcancel = blockTouch;
+ svg.oncontextmenu = blockTouch;
let res = document.evaluate(".//*[contains(@class,'led')]", svg);
let node = res.iterateNext();