Fix vertical scrolling
In the layout provided by the server the scrolling container is now the body instead of the content wrapper. Note that the container used in "galleryfileaction.js" was not modified on purpose, as that feature is currently broken; it restores the scroll position when the slideshow is hidden due to the file list being reloaded, but that does not happen in Files app, only in public pages. Thus, in Files app it restores the position as soon as the file list is reloaded after closing the slideshow, so it changes the scroll position, for example, when the directory changes. However, as "#app-content" is used as the scrolling container in that case the scroll position of the body does not actually change. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
287741123a
commit
527421c2cf
|
@ -57,7 +57,7 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
// This block loads new rows
|
||||
$('html, #content-wrapper').scroll(function () {
|
||||
$(window).scroll(function () {
|
||||
Gallery.view.loadVisibleRows(Gallery.albumMap[Gallery.currentAlbum]);
|
||||
});
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
* At this stage, there is no loading taking place, so we can look for new rows
|
||||
*/
|
||||
|
||||
var scroll = $('#content-wrapper').scrollTop() + $(window).scrollTop();
|
||||
var scroll = $(window).scrollTop() + $(window).scrollTop();
|
||||
// 2 windows worth of rows is the limit from which we need to start loading new rows.
|
||||
// As we scroll down, it grows
|
||||
var targetHeight = ($(window).height() * 2) + scroll;
|
||||
|
|
Loading…
Reference in New Issue