diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index b5d57a344..a693c1f75 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -3103,6 +3103,9 @@ export class LGraphCanvas { this.adjustMouseEvent(e) + const now = LiteGraph.getTime() + e.click_time = now - this.last_mouseclick + /** The mouseup event occurred near the mousedown event. */ /** Normal-looking click event - mouseUp occurred near mouseDown, without dragging. */ const isClick = pointer.up(e) @@ -3120,8 +3123,6 @@ export class LGraphCanvas { return } - const now = LiteGraph.getTime() - e.click_time = now - this.last_mouseclick this.last_mouse_dragging = false this.last_click_position = null