summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-02-20 10:22:07 +0100
committerJulius Härtl <jus@bitgrid.net>2019-02-20 10:22:07 +0100
commitc8ce7ebae25259067a0b01f631c29d84abc002ba (patch)
treee299db5e38916755aaf311be19d9c51926d56e2d /apps/files/js
parent10ae7af87f2d152e7b76e1105b051a1e07fbaa27 (diff)
downloadnextcloud-server-c8ce7ebae25259067a0b01f631c29d84abc002ba.tar.gz
nextcloud-server-c8ce7ebae25259067a0b01f631c29d84abc002ba.zip
Use proper scroll container when dragging files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/files.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index a785a44ddd6..d044d365ed6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -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);
}