Skip to content
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

Handle dropdowns near edge of page where items might not be visible #19888

Closed
Mevrael opened this issue May 12, 2016 · 4 comments
Closed

Handle dropdowns near edge of page where items might not be visible #19888

Mevrael opened this issue May 12, 2016 · 4 comments

Comments

@Mevrael
Copy link

Mevrael commented May 12, 2016

  • When .dropdown-menu have many dropdown-items
  • and there are not enough space in viewport
  • -> dropdown-menu itself is not scrollable and it is impossible to view dropdown-items out of viewport

Those 2 simple lines of CSS (without any JS) works like a charm

.dropdown-menu {
  overflow-y: auto;
  max-height: 80vh;
}

Even if it's not the best solution and still in some cases (large dropdown at the bottom of page but there should be a JS to show dropdown up not down) will fail, for most cases it will work and I think it's a good temporary option until someone will make an issue with his use case.

@mdo
Copy link
Member

mdo commented May 12, 2016

Why not remove elements from the dropdown menu, or try another design pattern altogether?

@cvrebert
Copy link
Collaborator

Does the page not resize itself to become slightly taller to fit the menu thus allowing access to the rest of the menu items via scrolling the page?

@cvrebert cvrebert changed the title [v4, dropdown, sass] Add simple auto scrolling for large dropdowns without JS Handle dropdowns near edge of page where items might not be visible May 12, 2016
@cvrebert
Copy link
Collaborator

We're hopefully going to integrate Tether with the dropdowns, such that it would flip the direction of the dropdown menu in such cases where the items would otherwise go beyond the viewport.

@Johann-S
Copy link
Member

Closed and fixed by #22444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants