From 13f046f3104cc0becefeafc9cd356363e677f8ae Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Wed, 7 Oct 2020 09:57:34 +0900 Subject: [PATCH] fix unexpected line break of sidebar tab name popover --- .../@node-red/editor-client/src/js/ui/common/popover.js | 3 ++- 1 file changed, 2 insertions(+), 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 afda75390..78aacba52 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 @@ -84,6 +84,7 @@ RED.popover = (function() { var targetHeight = target.outerHeight(); var divHeight = div.height(); var divWidth = div.width(); + var paddingRight = 10; var viewportTop = $(window).scrollTop(); var viewportLeft = $(window).scrollLeft(); @@ -105,7 +106,7 @@ RED.popover = (function() { d = "right"; top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top; left = targetPos.left+targetWidth+deltaSizes[size].leftRight; - } else if (left+divWidth > viewportRight) { + } else if (left+divWidth+paddingRight > viewportRight) { d = "left"; top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top; left = targetPos.left-deltaSizes[size].leftLeft-divWidth;