这在 Chrome 中运行良好,但我需要更改什么才能使其在 Firefox 中运行?
e.ctrlKey
在 FF 中保持为 false:
$('img').on('drag', function(e){
console.log('ctrlKey', e.ctrlKey);
});
最佳答案
我认为这是 Firefox 中的错误。经过一番挖掘 Bugzilla我发现了与您的问题类似的未确认错误,标题为 DragEnd event does not reflect real ctrl/shift/alt key status .
关于javascript - HTML5 图像拖动事件 - ctrlKey 在 Firefox 29 中仍然为 false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24016457/