From 2bd5c4f527ea370996defbc510b82dfdce017a69 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 22 Oct 2021 09:24:40 +0100 Subject: [PATCH] Ensure tourGuide popover doesn't fall offscreen Only handles the left hand edge - will need expanding to cover the other edges as needed --- .../@node-red/editor-client/src/js/ui/tour/tourGuide.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js index 87f9cabf2..651020d21 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js @@ -348,7 +348,12 @@ RED.tourGuide = (function() { maxWidth: maxWidth+"px", direction: direction, }) - + setTimeout(function() { + var pos = popover.element.position() + if (pos.left < 0) { + popover.element.css({left: 0}); + } + },100); if (nextButton) { setTimeout(function() { nextButton.focus();