Fixed and Closes #383

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-20 14:15:26 +02:00
parent 4a23770fe3
commit 1b86ae514b

View File

@@ -979,7 +979,11 @@ function resizePlaylistPlaying(playing) {
List.element_height = (Helper.computedStyle("#wrapper", "height") / List.can_fit)-5.3;
Helper.css(".list-song", "height", List.element_height + "px");
Channel.set_title_width();
List.dynamicContentPageJumpTo(page / canFit);
var toJumpTo = page / canFit;
if(toJumpTo > Math.floor(full_playlist.length / List.can_fit)) {
toJumpTo = Math.floor(full_playlist.length / List.can_fit);
}
List.dynamicContentPageJumpTo(toJumpTo);
if(!client) {
var controlsPosition = document.querySelector("#controls").offsetHeight - Helper.computedStyle("#controls", "height");
if(document.querySelectorAll("#controls").length > 0 && !Helper.mobilecheck()) {