如何用JavaScript禁用edge浏览器中的鼠标手势?【关键是edge浏览器】

问题描述 投票:0回答:1

我想用 JavaScript 禁用 Edge 浏览器中的鼠标手势,因为它会干扰我的右绘图功能

我尝试了一些事件监控,但没有成功


<!doctype html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta name='viewport'
        content='width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'>
  <meta http-equiv='X-UA-Compatible' content='ie=edge'>
  <title>edge mouse gestures</title>
</head>
<body>

<script>
  const fn = (e) => {
    e.preventDefault()
    e.stopPropagation()
  }
  document.addEventListener('mousedown', fn)
  document.addEventListener('contextmenu', fn)
  document.addEventListener('mousemove', fn)
  document.addEventListener('touchstart', fn, false)
  document.addEventListener('touchend', fn, false)
  document.addEventListener('touchmove', fn, false)
  window.addEventListener('mousedown', fn)
  window.addEventListener('contextmenu', fn)
  window.addEventListener('mousemove', fn)
  window.addEventListener('touchstart', fn, false)
  window.addEventListener('touchend', fn, false)
  window.addEventListener('touchmove', fn, false)
</script>
</body>
</html>
javascript microsoft-edge mouse gesture microsoft-edge-extension
1个回答
0
投票

等待答案!我也对EGDE的更新感到困惑;

© www.soinside.com 2019 - 2024. All rights reserved.