-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 - Dropdown should adjust its placement to ensure it stays within viewport #17167
Comments
Pretty sure the old version didn't do that either. |
|
@hnrch02 Nope did not add that class to the dropdown in v3: |
Can you post your v4 test as a JS Bin? |
@hnrch02 seems to have to do with being in a navbar I believe |
Ah, we used to special-case dropdowns within |
Well, |
A dropdown menu pulled right on a fluid navbar is probably one of the most common use cases. Perhaps the dropdown menu should default to aligning its right side to the left side of the dropdown element, and the opposite be the special case. |
yeah i'd rather us solve this particular use case in css since so easy/common - @mdo what are your thoughts? we could move dropdown onto tether but makes dropdown plugin a bit more complicated |
IMHO, I think it's worth doing that. Way more robust. |
yeah fair enough |
The suggestion of a new placement library here: #19673 - seems to have better support for flipping than Tether. |
Until this is solved (after 1 year of talking about it, here is a quick solution) .dropdown-menu { And just add .navbar in front of the selector if you do not need this project wide... |
@joviczarko in v4 alpha6 not working. Can you please add demo via JSBin? |
This works in v4 alpha6: <div class="dropdown-menu" style="left:initial;right:0;" ... |
Closed and fixed by #22444 |
With the new version, dropdown content does not reconize, when the element is out of view and does not change the align:

The text was updated successfully, but these errors were encountered: