remove useless stopPropagation on mouseup
This commit is contained in:
parent
7f6e94f021
commit
269e8d976d
1 changed files with 6 additions and 8 deletions
|
|
@ -131,8 +131,6 @@ else {
|
|||
|
||||
document.removeEventListener("mousemove", eventHandler, true);
|
||||
document.removeEventListener("mouseup", onMouseUp, true);
|
||||
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
document.addEventListener("mousemove", eventHandler, true);
|
||||
|
|
@ -241,11 +239,11 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
|||
else
|
||||
return;
|
||||
}
|
||||
if (keyCode == 18 || keyCode == 17) {
|
||||
if (keyCode === 18 || keyCode === 17) {
|
||||
var location = e.location || e.keyLocation;
|
||||
if (keyCode == 17 && location == 1) {
|
||||
if (keyCode === 17 && location === 1) {
|
||||
ts = e.timeStamp;
|
||||
} else if (keyCode == 18 && hashId == 3 && location == 2) {
|
||||
} else if (keyCode === 18 && hashId === 3 && location === 2) {
|
||||
var dt = -ts;
|
||||
ts = e.timeStamp;
|
||||
dt += ts;
|
||||
|
|
@ -273,12 +271,12 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
|||
keyCode = 0;
|
||||
}
|
||||
|
||||
if (hashId & 8 && (keyCode == 91 || keyCode == 93)) {
|
||||
if (hashId & 8 && (keyCode === 91 || keyCode === 93)) {
|
||||
keyCode = 0;
|
||||
}
|
||||
|
||||
if (!hashId && keyCode == 13) {
|
||||
if (e.keyLocation || e.location == 3) {
|
||||
if (!hashId && keyCode === 13) {
|
||||
if (e.location || e.keyLocation === 3) {
|
||||
callback(e, hashId, -keyCode)
|
||||
if (e.defaultPrevented)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue