From e28191600d3d8000bc999169fe558320418fcfa2 Mon Sep 17 00:00:00 2001
From: nathan <nathangray.bsc+github@gmail.com>
Date: Thu, 20 Jul 2023 16:56:32 -0600
Subject: [PATCH] Calendar: Stop double add for fast clickers

---
 calendar/js/et2_widget_timegrid.ts | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts
index 1179d8fbd6..de70cfc5a6 100644
--- a/calendar/js/et2_widget_timegrid.ts
+++ b/calendar/js/et2_widget_timegrid.ts
@@ -2197,15 +2197,11 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet
 		{
 			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
-			if(navigator.userAgent.toLowerCase().indexOf('firefox') == -1)
-			{
-				// Fake a click for non-ff
-				event.stopImmediatePropagation();
-				this.gridHover[0].dispatchEvent(new Event("click"));
-			}
+			// Not dragged enough to count, fake a click
+			event.stopImmediatePropagation();
+			this.gridHover[0].dispatchEvent(new Event("click"));
 		}
 	}