From 7610353f07986a6e6ffeb5d35e395d3256214ff8 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 19 Oct 2021 22:22:53 +0100 Subject: [PATCH] Position popover properly on a scrolled page Not needed in the core editor, but needed in the docs pages that can scroll --- .../@node-red/editor-client/src/js/ui/common/popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js index 762109774..f060af37d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js @@ -603,7 +603,7 @@ RED.popover = (function() { var panelWidth = panel.width(); var top = (targetHeight+pos.top) + offset[1]; - if (top+panelHeight > $(window).height()) { + if (top+panelHeight-$(document).scrollTop() > $(window).height()) { top -= (top+panelHeight)-$(window).height() + 5; } if (top < 0) {