]> source.dussan.org Git - nextcloud-server.git/commitdiff
Extra position check for multiselect dropdown. Fix app/issues/575
authorThomas Tanghus <thomas@tanghus.net>
Sat, 16 Feb 2013 18:56:56 +0000 (19:56 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Sat, 16 Feb 2013 18:56:56 +0000 (19:56 +0100)
core/js/multiselect.js

index 623c6e0f7e1c02a71a781bdf1341b426f5050f23..bc4223feb64735cffe364eb953b17d076e544cae 100644 (file)
                        }
                        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,