Calendar: Stop double add for fast clickers

This commit is contained in:
nathan 2023-07-20 16:56:32 -06:00
parent 0e011c63e7
commit 609d7b9855

View File

@ -2194,15 +2194,11 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet
{ {
this._drag_create_end(this.drag_create.end); this._drag_create_end(this.drag_create.end);
} }
else else if(this.drag_create.start)
{ {
// Not dragged enough to count, but Firefox will still count it as a click // Not dragged enough to count, fake a click
if(navigator.userAgent.toLowerCase().indexOf('firefox') == -1) event.stopImmediatePropagation();
{ this.gridHover[0].dispatchEvent(new Event("click"));
// Fake a click for non-ff
event.stopImmediatePropagation();
this.gridHover[0].dispatchEvent(new Event("click"));
}
} }
} }