summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-12-21 00:53:23 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-12-21 00:53:23 +0100
commit63fa943a52d441f7eec4222b6c1eac0362908024 (patch)
treed991646722938995fae5291ac8ab05b1e9110fbe /core
parent73b186cc60ddf938936bf9c8c10b714a9c9f1587 (diff)
downloadnextcloud-server-63fa943a52d441f7eec4222b6c1eac0362908024.tar.gz
nextcloud-server-63fa943a52d441f7eec4222b6c1eac0362908024.zip
multiSelect: Don't force popup above if there's no room for it there.
Diffstat (limited to 'core')
-rw-r--r--core/js/multiselect.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index 9e808a2bb72..d66c8eba625 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -238,7 +238,9 @@
list.append(li);
}
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('left',pos.left+3);
list.css('width',(button.outerWidth()-2)+'px');