Skip to content
Snippets Groups Projects
Commit 63fa943a authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

multiSelect: Don't force popup above if there's no room for it there.

parent 73b186cc
No related branches found
No related tags found
No related merge requests found
...@@ -238,7 +238,9 @@ ...@@ -238,7 +238,9 @@
list.append(li); list.append(li);
} }
var pos=button.position(); var pos=button.position();
if($(document).height() > button.offset().top+button.outerHeight() + list.children().length * button.height()) { if($(document).height() > (button.offset().top+button.outerHeight() + list.children().length * button.height())
|| $(document).height()/2 > pos.top
) {
list.css('top',pos.top+button.outerHeight()-5); list.css('top',pos.top+button.outerHeight()-5);
list.css('left',pos.left+3); list.css('left',pos.left+3);
list.css('width',(button.outerWidth()-2)+'px'); list.css('width',(button.outerWidth()-2)+'px');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment