This is a migrated thread and some comments may be shown as answers.

kendoDropTarget "drop" fires event twice

4 Answers 288 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Mohammed asked on 19 Jun 2012, 08:31 AM
Hi.

I'm using 'kendoDropTarget' on a treeview, the drop function seems to fire the event twice in Internet Explorer. 

for example,
$("#treeview").kendoDropTarget({
        dragAndDrop: true,
        drop: droptargetOnDrop
    });

And the function: 
function droptargetOnDrop(e)
{
   alert("fires twice");
}

4 Answers, 1 is accepted

Sort by
0
Mohammed
Top achievements
Rank 1
answered on 20 Jun 2012, 01:19 PM
It looks like a bug in KendoUI kendoDropTarget. Attached sample.

Tested in IE 7, 8 and 9, and they behave exactly the same.

Mohammed.
0
Accepted
Alexander Valchev
Telerik team
answered on 21 Jun 2012, 03:08 PM
Hi Mohammed,

I have already replied to your support ticket on the same subject. I will repeat the answer here as well, so the other users who experience the same behaviour would be able to read it.

Indeed the problem occurs only if alert is used and cannot be reproduced if for example console.log() is called instead. It seems that the alert call is actually causing that issue itself, because the event did not fire twice in any other case that we tested.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Miika
Top achievements
Rank 1
answered on 15 Mar 2013, 10:28 AM
Hi,

Also working on the Kendo UI TreeView drag'n'drop functionality, and noticed that if I put an alert() in the drop event, it takes 15-30 seconds to complete, locking down the entire browser. Very strange behaviour. console.log() goes through instantly.

Not a crucial issue (alerts only used in debugging), but would be nice to understand why it happens, or if perhaps something else can cause the lockdown as well.

Regards,
Miika
0
Alexander Valchev
Telerik team
answered on 20 Mar 2013, 08:19 AM
Hello Miika,

Alert blocks the JavaScript execution and changes the normal flow of events. To test please use console.log or any other JavaScript logic.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Drag and Drop
Asked by
Mohammed
Top achievements
Rank 1
Answers by
Mohammed
Top achievements
Rank 1
Alexander Valchev
Telerik team
Miika
Top achievements
Rank 1
Share this question
or