diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-02-20 10:22:07 +0100 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-02-20 10:10:32 +0000 |
commit | ce33f5845902ea5cf6e44ad3ed3224b9699b3dcf (patch) | |
tree | 40a4b130ed721191de0e7c25fffe62d0a6826b91 /apps/files | |
parent | 6e110c35b03ed780b1810e9bb68877a800fee195 (diff) | |
download | nextcloud-server-ce33f5845902ea5cf6e44ad3ed3224b9699b3dcf.tar.gz nextcloud-server-ce33f5845902ea5cf6e44ad3ed3224b9699b3dcf.zip |
Use proper scroll container when dragging files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/files.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 016aef05a96..d739131e9c6 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -451,21 +451,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); } |