From e21ce3f54bf0c0461373b89e9ad03e3921a8b93e Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 17 Mar 2023 13:45:54 -0600 Subject: [PATCH] Calendar: Fix drag and drop across weeks Couldn't drop an event from one week to another --- calendar/js/et2_widget_timegrid.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts index ff1138bba1..8586deefad 100644 --- a/calendar/js/et2_widget_timegrid.ts +++ b/calendar/js/et2_widget_timegrid.ts @@ -362,15 +362,16 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet // Cancel drag to create, we're dragging an existing event timegrid.drag_create.start = null; timegrid._drag_create_end(); - timegrid.div.on("dragover.timegrid", (e) => - { - timegrid._get_time_from_position(e.clientX, e.clientY); - }) + timegrid._get_time_from_position(event.clientX, event.clientY); }) .on("dragend", () => { timegrid.div.off("drag.timegrid"); }) + .on('dragover', function(event) + { + timegrid._get_time_from_position(event.clientX, event.clientY); + }) .on('mousemove', function(event) { timegrid._get_time_from_position(event.clientX, event.clientY);