mouse handler fix for IE8 (closes #241)

This commit is contained in:
Andrew Dolgov 2009-06-19 11:24:12 +04:00
parent 95f67d2ebc
commit 5c4461432c
2 changed files with 6 additions and 6 deletions

View File

@ -621,7 +621,7 @@ function mouse_down_handler(e) {
try {
/* do not prevent right click */
if (e.button && e.button == 2) return;
if (e && e.button && e.button == 2) return;
if (resize_enabled) {
mouse_is_down = true;
@ -637,7 +637,7 @@ function mouse_down_handler(e) {
}
} catch (e) {
exception_error("mouse_move_handler", e);
exception_error("mouse_down_handler", e);
}
}
@ -656,7 +656,7 @@ function mouse_up_handler(e) {
}
} catch (e) {
exception_error("mouse_move_handler", e);
exception_error("mouse_up_handler", e);
}
}

View File

@ -2103,7 +2103,7 @@ function mouse_down_handler(e) {
try {
/* do not prevent right click */
if (e.button && e.button == 2) return;
if (e && e.button && e.button == 2) return;
if (selection_disabled) {
document.onselectstart = function() { return false; };
@ -2111,7 +2111,7 @@ function mouse_down_handler(e) {
}
} catch (e) {
exception_error("mouse_move_handler", e);
exception_error("mouse_down_handler", e);
}
}
@ -2128,7 +2128,7 @@ function mouse_up_handler(e) {
}
} catch (e) {
exception_error("mouse_move_handler", e);
exception_error("mouse_up_handler", e);
}
}