summaryrefslogtreecommitdiffstats
path: root/core/js/multiselect.js
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-02-16 19:56:56 +0100
committerThomas Tanghus <thomas@tanghus.net>2013-02-16 19:56:56 +0100
commit5a8e0f2048d6b2ef1d271fc8ca05c6d5bd338aed (patch)
treefa985fb22c3899828127e4511427a7cd01f2df0f /core/js/multiselect.js
parent17d21a84b625cdb216faa4ad24280644bbc6b51f (diff)
downloadnextcloud-server-5a8e0f2048d6b2ef1d271fc8ca05c6d5bd338aed.tar.gz
nextcloud-server-5a8e0f2048d6b2ef1d271fc8ca05c6d5bd338aed.zip
Extra position check for multiselect dropdown. Fix app/issues/575
Diffstat (limited to 'core/js/multiselect.js')
-rw-r--r--core/js/multiselect.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index 623c6e0f7e1..bc4223feb64 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -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,