diff --git a/src/litegraph.js b/src/litegraph.js index 8591ed1140..7cd538a7f7 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7477,7 +7477,9 @@ LGraphNode.prototype.executeAction = function(action) * @method adjustMouseEvent **/ LGraphCanvas.prototype.adjustMouseEvent = function(e) { - + var clientX_rel = 0; + var clientY_rel = 0; + if (this.canvas) { var b = this.canvas.getBoundingClientRect(); clientX_rel = e.clientX - b.left;