Drag-and-drop error

I’ve discovered the following behavior in the drag-and-drop example of dhtmlxTreeGrid (v1.5):

If you drag a row from one grid to another (or within the same grid, does’nt matter) and hit the right mouse button before you drop the row, an error will occur which prevents the row from being dropped correctly afterwards. It seems that the right click event prevents the drag-and-drop code of dhtmlxTreeGrid from being executed correctly, so there even might be other events that could also interfere in this sitution if they occur.

Of course the example I gave is not a realistic scenario of user behavior, but one could accidentially hit the right mouse button in this situation. Is there a way to fix this to prevent users from (accidentally or intentionally) runnig into this error?

Thank you in advance

Problem confirmed and fixed. Fix will be released as part of next build.
If you need it ASAP - please contact us directly at support@dhtmlx.com and provide your ref. number.

I received your fix. Thank you for that, but unfortunately it didn’t solve the problem for me.

Could you please check if the problem is really fixed? If so, maybe I just got the wrong files.

Thank you.

The problem can’t be reconstructed anymore after latest fix.
Please be sure to update both provided files.

If problem still occurs for you - please send any kind of sample where it can be reconstructed ( you can send it directly to support@dhtmlx.com )

That’s strange because actually I can still reconstruct the problem
with the drag and drop examples of dhtmlxGrid and dhtmlxTreeGrid even
if both files are updated. The browser I use is Firefox

Therefore I took the (non-modified) dhtmlxTreeGrid v1.5 package and
updated both files. Then I cleared the browser cache as a precaution and opened the
example “dhtmlxGrid\samples\drag_n_drop\drag_grid.html”. Then I did
exactly what I described in my first message. After hitting the right
mouse button before dropping the row with the left mouse button, the following error occurs:

r2 has no properties

    if (r2.treeNod.isTreeGrid()) c.set(“source”,“treeGrid”);

    dhtmlxgrid_drag.js (line 315)

After that, the dragged node will stick to the cursor and can only be dropped outside the grid areas. But doing so will bring up the following error on any further mouse movement:

dragger.dragStartObject._createDragNode is not a function
    dhtmlxcommon.js (line 294)

As this is exactly what happend before I updated the two files, I am not shure if I received the correct fix as you say the problem can’t be reconstructed anymore after the latest fix.

Thank you for your efforts.

In which browser problem occurs for you ?

The error I described above appeared on Mozilla Firefox Further testing with the updated files showed that the same error also appears on Microsoft Internet Explorer 7:
    Line:    316
    Char:    9
    Error:    ‘treeNod’ is null or not an object
    Code:    0

(although the behavior of Microsoft IE 7 is slightly different compared to Firefox in error case)

I also tested Microsoft IE 7 without the fix and I noticed that no error occurs in this case!

Furthermore I’ve overlooked that in Firefox the error which appears with the updated files is not the same that appears without the fix. Sorry for that mistake. Without the fix, the error in Firefox is as follows:

r2 has no properties
if (this._autoOpenTimer)window.clearTimeout(this._autoOpenTimer);var r1=targetH…
    dhtmlxgrid_drag.js (line 16)

Please check additional sample, which was sent by email, it contains updated dhtmlxcommon.js which must fix second issue as well.

The additional sample with the updated dhtmlxcommon.js works perfectly.

Thank you very much!