diff --git a/packages/manager/apps/telecom/src/components/telecom/telephony/scheduler/scheduler.directive.js b/packages/manager/apps/telecom/src/components/telecom/telephony/scheduler/scheduler.directive.js index d2a14e3f38b7..a716168a38f4 100644 --- a/packages/manager/apps/telecom/src/components/telecom/telephony/scheduler/scheduler.directive.js +++ b/packages/manager/apps/telecom/src/components/telecom/telephony/scheduler/scheduler.directive.js @@ -117,6 +117,7 @@ export default /* @ngInject */ ($compile, $locale, coreConfig) => ({ const { x, y } = element[0].getBoundingClientRect(); const nearFromBottomBorder = y >= (3 * window.screen.height) / 4; const nearFromRightBorder = x >= (3 * window.screen.width) / 4; + const nearFromTopBorder = y <= window.screen.height / 4; if (nearFromRightBorder) { return 'auto right'; @@ -125,7 +126,11 @@ export default /* @ngInject */ ($compile, $locale, coreConfig) => ({ return 'top left'; } - return 'auto left'; + if (nearFromTopBorder) { + return 'bottom auto'; + } + + return 'top auto'; }, 'data-popover-is-open': 'event.inEdition', 'data-popover-class': 'pretty-popover telephony-scheduler-events-popup',