This repository has been archived by the owner on May 29, 2019. It is now read-only.
Right alignment is off for dropdown-append-to-body .dropdown-menu-right when there's no vertical scrollbar #5942
Labels
Milestone
Bug description:
As pointed out by @achenxp, my fix for issue #4317 is incorrect, and causes the dropdown to receive the wrong position when there's no overflow (and the vertical scrollbar is hidden).
This is because the fix always adds the scrollbar width to the position, without checking if the parent (body) element overflows.
Note: I have a working fix at my fork here: dolevd@f838eb6
This fix checks for overflow whenever the dropdown is open and is right aligned relative to the body, and calculates the position accordingly.
I'll submit this fix as a pull request shortly.
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/dIXoXxcH7RoeyHYIB4qw?p=preview
Notice that the first dropdown is incorrectly aligned to the right.
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.5
UIBS: 1.3.3
Bootstrap: 3.3.6
The text was updated successfully, but these errors were encountered: