diff --git a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java index 5e76d9d440d6..cd1c17c4dfff 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java @@ -624,6 +624,12 @@ public class AbstractPopup implements JBPopup { } Rectangle targetBounds = new Rectangle(xy, myContent.getPreferredSize()); + Insets insets = myPopupBorder.getBorderInsets(myContent); + if (insets != null) { + targetBounds.x += insets.left; + targetBounds.y += insets.top; + } + Rectangle original = new Rectangle(targetBounds); if (myLocateWithinScreen) { ScreenUtil.moveRectangleToFitTheScreen(targetBounds);