'How to solve mousemove event bug in Chrome
I give mouseup mousedown mousemove different event handler:
var body = document.querySelector("body");
body.addEventListener("mouseup", function () {
console.log("mouseup");
});
body.addEventListener("mousedown", function () {
console.log("mousedown");
});
body.addEventListener("mousemove", function () {
console.log("mousemove");
})
when I click right mouse button, open the context menu, without mouse move, it will trigger the mouse move event,
the more strange thing is, if I open the context menu again, event the mouse down event couldn't be trigger, could only trigger the mouse move event
How can I solve this problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
