【发布时间】:2011-07-21 13:43:56
【问题描述】:
我似乎无法在 Firefox 的 HTML5 画布中获取 onMouseWheel 事件。以下 sn-p 在 Chrome 和 IE9 中按预期工作,但在 Firefox 中我只收到点击事件:
<!DOCTYPE html>
<html>
<body>
<canvas id="TestCanvas" tabindex="2" onmousewheel="window.alert('wheel!')" onclick="window.alert('click!')" style="width:90%;height:90%;margin-left:auto;margin-right:auto border:1px solid green;"></canvas>
</body>
</html>
根据我看到的规范,onMouseWheel 应该是 HTML5 元素上的标准事件。我做错了吗?
【问题讨论】: