diff --git a/css/backoffice/components/_newsroom-menu.scss b/css/backoffice/components/_newsroom-menu.scss index 10b8d2b20..7e2554c0e 100644 --- a/css/backoffice/components/_newsroom-menu.scss +++ b/css/backoffice/components/_newsroom-menu.scss @@ -50,12 +50,13 @@ $ibo-popover-menu--item--no-message--image--svg--padding : 15px !default; flex-flow: column; min-width: $ibo-navigation-menu--notifications-menu--min-width; .ibo-navigation-menu--notifications--messages-section{ - overflow-x: auto; + overflow: auto; } } .ibo-navigation-menu--notifications--show-all-messages, .ibo-navigation-menu--notifications-dismiss-all, .ibo-navigation-menu--notifications-show-all-multiple{ overflow-x: inherit; text-align: center; + min-height: 45px; } .ibo-navigation-menu--notifications--item--image{ diff --git a/js/components/newsroom-menu.js b/js/components/newsroom-menu.js index e716a4ed3..d789a86d6 100644 --- a/js/components/newsroom-menu.js +++ b/js/components/newsroom-menu.js @@ -44,11 +44,13 @@ $(function() $(this.js_selectors.menu_toggler).on('click', function(oEvent) { var oEventTarget = $(oEvent.target); var aEventTargetPos = oEventTarget.position(); + var aEventTargetOffset = oEventTarget.offset(); + $iHeight = Math.abs(aEventTargetOffset.top - 100); $(me.element).css({ - 'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - $(me.element).height()) + 'px', + 'max-height': $iHeight + 'px', + 'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - Math.min($(me.element).height(), $iHeight)) + 'px', 'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width()) + 'px', - 'max-height' : (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) - 100) + 'px' }); $(me.element).popover_menu("togglePopup"); });