Disable Double Click Event

I have adjusted the behaviour of the Scheduler to show the full editor on a single click. This aligns much better with the mobile experience. I now want to disable double click on the desktop environment. However, it seems we get both the single and double click events when the user double clicks a cell. Is there a way to disable the double click event?

3 Replies 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team November 24, 2020 11:05 AM UTC

Hi Scott, 

Greetings from Syncfusion support. 

We have validated your requirement at our end. Based on your query we suspect that your requirement is to prevent actions in cell double click. We have achieved your requirement with the help of the cellDoubleClick event of the Schedule as shown in the below code by setting the args.cancel value to true. We have prepared a sample for your reference which can be available below. 

[Index.cshtml] 
@using Syncfusion.EJ2.Schedule 
 
@Html.EJS().Schedule("schedule").Height("550px").EventSettings(new ScheduleEventSettings { DataSource = ViewBag.appointments }).SelectedDate(new DateTime(2018, 2, 15)).CellDoubleClick("OnClick").Render() 
 
<script type="text/javascript"> 
    function OnClick(args) { 
        args.cancel = true; 
    } 
</script> 


Kindly try the above sample and get back to us if you need any further assistance. 

Regards, 
Ravikumar Venkatesan 



SC Scott Champ November 24, 2020 12:53 PM UTC

Sorry, I may have not been completely clear. Again, we have the Scheduler setup to show the appropriate editors (Quick Info or Full) on a single click. Implementing your solution doesn't really fix the problem. When the user double clicks on a cell with the Scheduler setup as above, the editor still shows up. This is because, even though the user double clicks, the single click event is sent first. This causes the single click code to execute and shows the appropriate editor before I even get a chance to prevent it by returning args.cancel = true. You can see this in your demos when you double click a cell. You first temporarily see the quick info editor then you see the full editor. That is because both single and double click events are fired in this situation. Is there a way to prevent the single click event when the user double clicks.


RV Ravikumar Venkatesan Syncfusion Team November 25, 2020 03:44 PM UTC

Hi Scott, 

Thanks for the update. 

We have validated your reported query at our end and regret to let you know preventing the single click event when performing the double click is not feasible at our end. 

Please let us know if you need any further assistance. 

Regards, 
Ravikumar Venkatesan 


Marked as answer
Loader.
Up arrow icon