The #1 best answer: Tell your users that you do not support MS Edge.(最佳答案#1:告诉您的用户您不支持MS Edge。)
If that is not an option, then you'll need to track the mouse button status yourself, like(如果这不是一个选项,那么您需要自己跟踪鼠标按钮的状态,例如)
var leftPressed;
function init() {
document.body.addEventListener("mousedown mouseup") {
//update leftPressed
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…