using a grid, using extended drag mode. the grid has a context menu, on right click. i’m finding that the user, when right-clicking and moving the mouse, initiates a drag, creating a drag object (1 message, etc), and often latent drag objects or context menus that never close. a very strange bug.
the question is simple. i want to only initiate drag when user is clicking the LEFT mouse button, and to only have the context menu appear with RIGHT click. How do i do that?
great product
sandro
By default component allow the drag with any mouse button , but you can block drag by right click with next code modification
dhtmlxcommon.js , line 268
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{
if (window.dhtmlDragAndDrop.waitDrag) {
window.dhtmlDragAndDrop.waitDrag=0;
document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
return false;
}
if (((e||event)||{}).button==2) return; // <<<<next line added
window.dhtmlDragAndDrop.waitDrag=1;