When using placement="bottom left", if the popover has no space on bottom left, the adaptivePosition may endup changing the position to "left left", causing an error to be thrown:
After some debugging I verified that somewhere the flip function is called and returns a new left left position, which is not a valid key for PlacementForBs5, causing the error:
StackBlitz/GitHub repo that reproduces the issue:
Force the issue to occur by using a small resolution like 753x133.
Bug description:
When using
placement="bottom left"
, if the popover has no space on bottom left, theadaptivePosition
may endup changing the position to "left left", causing an error to be thrown:After some debugging I verified that somewhere the
flip
function is called and returns a newleft left
position, which is not a valid key forPlacementForBs5
, causing the error:StackBlitz/GitHub repo that reproduces the issue:
Force the issue to occur by using a small resolution like 753x133.
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap-popover-positioning?file=src%2Fapp%2Fpopover%2Fpopover.component.html
GitHub: https://github.com/tiago-eusebio-dev/ngx-bootstrap-popover-positioning
Versions used
ngx-bootstrap: 11.0.2 Angular: 16.2.12
Expected behavior
Not to throw a console error.