From 1844633ff1f22fed00b4b7cd0fcda3cb29cc1fd0 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 16 Jun 2022 22:56:54 +0100 Subject: [PATCH] Include scroll offset when positioning quick-add dialog Fixes #3684 --- .../node_modules/@node-red/editor-client/src/js/ui/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 9f28d7191..522b86cbc 100755 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -1071,8 +1071,8 @@ RED.view = (function() { var oy = point[1]; const offset = $("#red-ui-workspace-chart").offset() - var clientX = ox + offset.left - var clientY = oy + offset.top + var clientX = ox + offset.left - $("#red-ui-workspace-chart").scrollLeft() + var clientY = oy + offset.top - $("#red-ui-workspace-chart").scrollTop() if (RED.settings.get("editor").view['view-snap-grid']) { // eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red')