-
Notifications
You must be signed in to change notification settings - Fork 6.7k
dropdown-append-to-body doesn't work with .dropdown-menu-right #3820
Comments
Please demonstrate your issue in a plunkr. |
Does this really need a plunkr? It's really straightforward. I wrote the append-to-body feature of dropdown, and I actually just came across this issue myself. Here's the plunkr so we can get that out of the way: http://plnkr.co/edit/21xjDthnZsbC2StDy2VY?p=preview |
I tried out a fix, by looking for the dropdown-menu-right class, and changing the calculation for the CSS positions, so in dropdown.js instead of:
I used:
I didn't change the I must admit that I didn't do a lot of testing, just checked that my issue was resolved, so there may be a problem with the calculations. On the other hand, I didn't change the existing logic at all, only added support for right-aligned dropdowns. |
I'm having the same issue, thanks for the fix! @schmuli it would be nice if you could send a PR for your fix so everybody can take advantage of it. |
I wanted to first check that this is a valid fix, I'll try to get a PR ready in the next couple of days. |
👍 |
Hello,
When adding
dropdown-append-to-body
todropdown
component and inner menu has.dropdown-menu-right
class (for right side alignment) the dropdown menu position is set incorrectly. I've checked source code and noticed that when calculating position fordropdown-append-to-body
option onlyleft
property is used, hence not positioning correctly the menu... It should be usingright
instead of left..The text was updated successfully, but these errors were encountered: