If, as stated, this is a click and drag map them presumably the target-tile will be the same for both mouseup and mousedown.
You might consider my earlier suggestion:
Code:
var justClick = false;
someElement.onmousedown = function () {
justClick = true;
}
someElement.onmousemove = function () {
justClick = false;
}
someElement.onmouseup = function () {
if (justClick) {
// show menu..
return;
}
}
Although it's hard to be certain without further information.