diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/helpers/panel-helper.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/helpers/panel-helper.js index 72647a91..9c332499 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/helpers/panel-helper.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/helpers/panel-helper.js @@ -1,4 +1,5 @@ const setPanelContentMaxHeight = (balloonView) => { + const HEADER_HEIGHT = 90; const { innerHeight: windowHeight } = window; const { top: panelTopPosition, element: panelNode } = balloonView; const panelHeader = panelNode.querySelector('.ibexa-custom-tag-panel-header'); @@ -11,7 +12,7 @@ const setPanelContentMaxHeight = (balloonView) => { const panelHeaderHeight = panelHeader?.offsetHeight ?? 0; const panelFooterHeight = panelFooter?.offsetHeight ?? 0; - const isPanelOverTopWindowEdge = panelTopPosition < 0; + const isPanelOverTopWindowEdge = panelTopPosition - HEADER_HEIGHT < 0; const maxHeightValue = isPanelOverTopWindowEdge ? panelContent.offsetHeight - Math.abs(panelTopPosition) : windowHeight - panelTopPosition - panelHeaderHeight - panelFooterHeight;