diff --git a/bi/core.js b/bi/core.js index fa4761ae10..39ec4f58d5 100644 --- a/bi/core.js +++ b/bi/core.js @@ -16985,8 +16985,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -17009,6 +17009,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } });/** diff --git a/docs/core.js b/docs/core.js index 58670eef35..79ebe3be9c 100644 --- a/docs/core.js +++ b/docs/core.js @@ -22511,8 +22511,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -22535,6 +22535,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } });/** diff --git a/src/core/func/dom.js b/src/core/func/dom.js index 6a6f2dc3b1..95213e37ca 100644 --- a/src/core/func/dom.js +++ b/src/core/func/dom.js @@ -553,8 +553,8 @@ BI.extend(jQuery, { getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) { extraWidth || (extraWidth = 0); extraHeight || (extraHeight = 0); - var maxHeight = $("body").bounds().height - extraHeight; - maxHeight = Math.min(popup.attr("maxHeight") || maxHeight, maxHeight); + var bodyHeight = $("body").bounds().height - extraHeight; + var maxHeight = Math.min(popup.attr("maxHeight") || bodyHeight, bodyHeight); popup.resetHeight && popup.resetHeight(maxHeight); var position = $.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || ['bottom', 'top', 'right', 'left']); switch (offsetStyle) { @@ -577,6 +577,7 @@ BI.extend(jQuery, { } break; } + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); return position; } }); \ No newline at end of file