]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use proper scroll container when dragging files 14300/head
authorJulius Härtl <jus@bitgrid.net>
Wed, 20 Feb 2019 09:22:07 +0000 (10:22 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 20 Feb 2019 09:22:07 +0000 (10:22 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/files.js

index a785a44ddd68db87ff13057ce73fa154f1d70cd3..d044d365ed659a791a44746eb6f309fc63e01ef6 100644 (file)
@@ -455,21 +455,20 @@ var dragOptions={
                $('.crumbmenu').removeClass('canDropChildren');
        },
        drag: function(event, ui) {
-               var scrollingArea = FileList.$container;
+               var scrollingArea = window;
                var currentScrollTop = $(scrollingArea).scrollTop();
                var scrollArea = Math.min(Math.floor($(window).innerHeight() / 2), 100);
 
                var bottom = $(window).innerHeight() - scrollArea;
                var top = $(window).scrollTop() + scrollArea;
                if (event.pageY < top) {
-                       $('html, body').animate({
-
-                               scrollTop: $(scrollingArea).scrollTop(currentScrollTop - 10)
+                       $(scrollingArea).animate({
+                               scrollTop: currentScrollTop - 10
                        }, 400);
 
                } else if (event.pageY > bottom) {
-                       $('html, body').animate({
-                               scrollTop: $(scrollingArea).scrollTop(currentScrollTop + 10)
+                       $(scrollingArea).animate({
+                               scrollTop: currentScrollTop + 10
                        }, 400);
                }