Extra position check for multiselect dropdown. Fix app/issues/575

This commit is contained in:
Thomas Tanghus 2013-02-16 19:56:56 +01:00
parent 17d21a84b6
commit 5a8e0f2048
1 changed files with 3 additions and 2 deletions

View File

@ -266,8 +266,9 @@
}
list.append(list.find('li.creator'));
var pos=button.position();
if($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height())
|| $(document).height()/2 > pos.top
if(($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height())
&& $(document).height() - button.offset().top > (button.offset().top+button.outerHeight() + list.children().length * button.height()))
|| $(document).height()/2 > button.offset().top
) {
list.css({
top:pos.top+button.outerHeight()-5,