Browse Source

Merge pull request #11590 from owncloud/publiclinkscrollanimatefix

Use body element when animating scroll in public page
tags/v8.0.0alpha1
Vincent Petry 9 years ago
parent
commit
dd0b1e83b2
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      apps/files/js/filelist.js

+ 7
- 1
apps/files/js/filelist.js View File

@@ -1919,7 +1919,13 @@

// Animation
var _this = this;
this.$container.animate({
var $scrollContainer = this.$container;
if ($scrollContainer[0] === window) {
// need to use "body" to animate scrolling
// when the scroll container is the window
$scrollContainer = $('body');
}
$scrollContainer.animate({
// Scrolling to the top of the new element
scrollTop: currentOffset + $fileRow.offset().top - $fileRow.height() * 2 - additionalOffset
}, {

Loading…
Cancel
Save