Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-02-20 13:09:50 +0300
committerGitHub <noreply@github.com>2019-02-20 13:09:50 +0300
commit7f49a2cb63d979932890dd9fb296e9b8f27405cd (patch)
tree2a51e4a08680c72014a15eb7fc9a2f7497dcabde
parent97d173635f7821fb63a823f4e2db0995968cb55b (diff)
parentc8ce7ebae25259067a0b01f631c29d84abc002ba (diff)
Merge pull request #14300 from nextcloud/bugfix/12844/fix-drag-scroll
Use proper scroll container when dragging files
-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);
}