@madj2k/fe-frontend-kit 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -334,12 +334,15 @@ class Madj2kFlyoutMenu {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
|
|
337
|
+
const refObj = this.settings.$positionReference || this.$element;
|
|
338
|
+
const refPos = refObj.getBoundingClientRect();
|
|
339
|
+
const flyoutTop = refPos.top + refObj.offsetHeight;
|
|
337
340
|
|
|
338
341
|
// heightMode "full" with deprecated fullHeight-setting as fallback
|
|
339
342
|
if (this.settings.heightMode === 'full' || this.settings.fullHeight === true) {
|
|
340
343
|
const viewPortHeight = window.innerHeight;
|
|
341
344
|
if (height < viewPortHeight) {
|
|
342
|
-
this.settings.$menu.style.height = `100vh`;
|
|
345
|
+
this.settings.$menu.style.height = `calc(100vh + ${flyoutTop}px)`;
|
|
343
346
|
} else {
|
|
344
347
|
this.settings.$menu.style.height = `${height}px`;
|
|
345
348
|
}
|