diff --git a/js/components/newsroom-menu.js b/js/components/newsroom-menu.js index ddce9d7f8..a03b6ac4d 100644 --- a/js/components/newsroom-menu.js +++ b/js/components/newsroom-menu.js @@ -45,11 +45,15 @@ $(function() // Important: For now, the popover menu is manually instantiated even though the PHP NewsroomMenu class inherits PopoverMenu because the jQuery widget doesn't. We might refactor this in the future. $(me.element).popover_menu({'toggler': this.js_selectors.menu_toggler}); - $(this.js_selectors.menu_toggler).on('click', function (oEvent) { + $(this.js_selectors.menu_toggler).off('click').on('click', function (oEvent) { var oEventTarget = $(oEvent.target); var aEventTargetPos = oEventTarget.position(); var aEventTargetOffset = oEventTarget.offset(); + // N°2039 - When opening the menu, refresh messages without waiting for the providers TTL to avoid news not being visible even though they have been created + me.clearCache(); + me._getAllMessages(); + $iHeight = Math.abs(aEventTargetOffset.top-100); $(me.element).css({ 'max-height': $iHeight+'px',