sukima / ember-cli-select-picker

An enhanced Boostrap styled select component addon for Ember CLI
https://sukima.github.io/ember-cli-select-picker
MIT License
23 stars 15 forks source link

Adjust popup location based on space available #52

Closed sukima closed 8 years ago

sukima commented 8 years ago

One problem with the menu is that if it is near the bottom of the page the CSS has it larger then the bottom of the page cutting of a portion of the menu. It is difficult to select something when it is clipped off and you can not scroll to it.

We calculate the relative sizing every time the page resizes or scrolls so that we can attach the dropup class. This class tells bootstrap to make the menu pop up instead of down allowing selects that are near the bottom to be visible.

sukima commented 8 years ago

Failed tests seem to be a regression bug in Ember Beta. I'm going to ignore the test failure for now.

zbeat commented 8 years ago

:+1:

sukima commented 8 years ago

Ok @zbeat this is ready. want to do a final review/dev test?

zbeat commented 8 years ago

I tried doing a version w/ $(document).height() instead of $(window).height(), but it didn't work. Anyway, this works (in a different way).

sukima commented 8 years ago

Merge? :shipit: ?