diff --git a/client/components/lists/list.js b/client/components/lists/list.js index df43f896e..0f953ae36 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -134,7 +134,7 @@ BlazeComponent.extendComponent({ } if ( event.pageY > boardCanvas.offsetHeight - 10 && - boardCanvas.scrollTop < $boardCanvas.data('scrollTopMax') // don't scroll more than possible + event.pageY + boardCanvas.scrollTop < $boardCanvas.data('scrollTopMax') // don't scroll more than possible ) { // scroll to the bottom boardCanvas.scrollTop += 15; @@ -148,8 +148,8 @@ BlazeComponent.extendComponent({ const $boardCanvas = $('.board-canvas'); const boardCanvas = $boardCanvas[0]; // scrollTopMax and scrollLeftMax only available at Firefox (https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTopMax) - // https://stackoverflow.com/questions/12965296/how-to-get-maximum-document-scrolltop-value/12965383#12965383 - $boardCanvas.data('scrollTopMax', $(document).height() - $(window).height()); + // https://www.it-swarm.com.de/de/javascript/so-erhalten-sie-den-maximalen-dokument-scrolltop-wert/1069126844/ + $boardCanvas.data('scrollTopMax', boardCanvas.scrollHeight - boardCanvas.clientTop); // https://stackoverflow.com/questions/5138373/how-do-i-get-the-max-value-of-scrollleft/5704386#5704386 $boardCanvas.data('scrollLeftMax', boardCanvas.scrollWidth - boardCanvas.clientWidth); },