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

Allow dropdown-menu to to respect bounds of the viewport #51

Open
zbeat opened this issue Dec 8, 2015 · 1 comment
Open

Allow dropdown-menu to to respect bounds of the viewport #51

zbeat opened this issue Dec 8, 2015 · 1 comment

Comments

@zbeat
Copy link
Collaborator

zbeat commented Dec 8, 2015

The default max-height of a dropdown-menu is 400px, as set here:
https://github.com/sukima/ember-cli-select-picker/blob/master/vendor/select-picker.css#L20

This is causing menus embedded towards the bottom of a page to spill off the viewable screen. As a temporary fix in our project, we can override this max-height to 300px. But in an ideal world, wouldn't we want the library to override the default max-height IF that would cause the menu to spill off the current viewport? Thoughts?

Of note:

  1. It looks like bootstrap-select does this dynamically:
    https://github.com/silviomoreto/bootstrap-select/blob/a89ba9b56e6f7036afadbdf5c69718d79284c7dc/js/bootstrap-select.js#L862
  2. The Bootstrap tooltip now has a viewport option, to accommodate this (e.g. https://getbootstrap.com/javascript/#tooltips):
    Add tooltip viewport option, respect bounds of the viewport twbs/bootstrap#11593
@sukima
Copy link
Owner

sukima commented Dec 16, 2015

This is something to fix after PR #52 gets merged.

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

No branches or pull requests

2 participants