mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
List infinite scroll now always works
- before sometimes list scrolling stopped even the spinner was visible and scrolling was at the end of the list
This commit is contained in:
parent
ac3d658cb1
commit
4f9d3d8be5
1 changed files with 11 additions and 6 deletions
|
@ -770,16 +770,21 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
spinnerInView() {
|
||||
const parentViewHeight = this.container.clientHeight;
|
||||
const bottomViewPosition = this.container.scrollTop + parentViewHeight;
|
||||
|
||||
const threshold = this.spinner.offsetTop;
|
||||
|
||||
// spinner deleted
|
||||
if (!this.spinner.offsetTop) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return bottomViewPosition > threshold;
|
||||
const parentViewHeight = this.container.clientHeight;
|
||||
const bottomViewPosition = this.container.scrollTop + parentViewHeight;
|
||||
|
||||
let spinnerOffsetTop = this.spinner.offsetTop;
|
||||
|
||||
const addCard = $(this.container).find("a.open-minicard-composer").first()[0];
|
||||
if (addCard !== undefined) {
|
||||
spinnerOffsetTop -= addCard.clientHeight;
|
||||
}
|
||||
|
||||
return bottomViewPosition > spinnerOffsetTop;
|
||||
},
|
||||
}).register('spinnerList');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue