diff --git a/src/core/platform/web/dom.js b/src/core/platform/web/dom.js index 945aa359a..d934736c7 100644 --- a/src/core/platform/web/dom.js +++ b/src/core/platform/web/dom.js @@ -710,7 +710,7 @@ break; } if (needAdaptHeight === true) { - popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top + (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight)); + popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top - (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight)); } return position; },