|
if (pos === RenderPosition.BottomLeft || pos === RenderPosition.BottomRight) { |
|
const bottom = window.innerHeight - button.getBoundingClientRect().top - button.offsetHeight + window.scrollY; // get bottom of button |
|
popup.style.bottom = '0'; |
|
popup.style.maxHeight = 'calc(100vh - ' + (bottom + 25) + 'px)'; |
|
} else { |
|
popup.style.top = '0'; |
|
popup.style.maxHeight = 'calc(100vh - ' + (button.getBoundingClientRect().top - window.window.scrollY + 25) + 'px)'; |
The profiler shows a small holder due to this being inline and if max-height is removed it works fine. Only tested on bottomright position.