Enable automatic reversal of display orientation for popovers encountering boundary issues in certain scenarios. This enhancement ensures that the arrow correctly indicates the popover's origin, mitigating user confusion caused by viewport constraints.
Ideally, dynamic changes to the viewport would also need to be detected, and the position of the popover would need to be reversed when there isn't enough space.
Additionally, dynamic changes to the viewport need to be taken into consideration. For example, check the attached recording.
https://stackblitz.com/edit/angular-1sxnzn-yjzvbw5j