From ce33f5845902ea5cf6e44ad3ed3224b9699b3dcf Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 20 Feb 2019 10:22:07 +0100 Subject: Use proper scroll container when dragging files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/files.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/files') 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); } -- cgit v1.2.3