Drag and drop oversensitive on treeview nodes

Hi,
The drag and drop on the treeview component activates even after moving the mouse 1 pixel.
This leads to a lot of mistaken drags.
I can see on your demo for the listbox that the drag and drop works well. You have to drag maybe 1mm before it starts dragging.
Most drag and drop works like that.
But in the treeview the drag happens immediately. So some clicks can become drags by mistake.
It would be great to see it changed like the listbox drag.
Thanks

5 Replies 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team March 12, 2021 03:06 PM UTC

Hi Fergus, 
 
Greetings from Syncfusion support. 
 
We have validated your requirement in TreeView component. You can trigger the drag event based on the distance value, with the below customization.  
 
Please refer to the below code snippets. 
 
Index.razor 
 
<SfTreeView TValue="TeamDetails" AllowDragAndDrop="true"> 
    <TreeViewEvents TValue="TeamDetails" Created="Created"></TreeViewEvents> 
    <TreeViewFieldsSettings TValue="TeamDetails" Id="Id" Text="Name" Child="Children" DataSource="@Team" Expanded="Expanded"></TreeViewFieldsSettings> 
</SfTreeView>     
…….. 
…….. 
private async Task Created() 
    { 
        await JS.InvokeVoidAsync("slowDownDrag"); 
    } 
 
_Host.cshtml 
 
    <script> 
        window.slowDownDrag = (id) => { 
            document.getElementsByClassName("e-treeview")[0].ej2_instances[0].distance = 5; 
        }; 
    </script> 
 
You can change the above distance value based on your requirement. Please find the sample demonstrating the solution. 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 


Marked as answer

FE Fergus April 15, 2021 02:22 PM UTC

Hi,
Is it possible to also do this with the Scheduler events. 
They also drag too easily. I tried your solution for the treeview but i cannot get it to work with the scheduler events.

Thanks
Fergus


RV Ravikumar Venkatesan Syncfusion Team April 19, 2021 11:57 AM UTC

Hi Fergus, 
 
Thanks for your update. 
 
We have checked the reported scenario 'drag and drop oversensitive on scheduler' at our end. But were unable to replicate the problem at our end. 
 
Could you please share the following details if the issue persists still at your end? 
  • Syncfusion package version
  • Whether the issue replicates in the above sample?
  • If so, please share the issue replicating steps and video demo.
  • Try to replicate the issue in a sample.
 
Regards, 
Ravikumar Venkatesan 



FE Fergus April 19, 2021 02:38 PM UTC

Hi,
Yes it happens with the sample link you provided.
Basically it is the same as the treeview was. 
Many clicks get mistaken for drags as it starts to drag after even 1 pixel.
The solution you gave me for the treeview worked perfect. I set it to 5 pixels which would be closer to standard drag and drop.


HB Hareesh Balasubramanian Syncfusion Team April 20, 2021 12:48 PM UTC

Hi Fergus,

Thanks for your update.

We have tried clicking the appointments continuously, quickly but we were unable to replicate the problem at our end.

Could you please share the exact issue replicating steps and video demo depicting the issue to validate the problem at our end?

Regards,
Hareesh


Loader.
Up arrow icon