Fix height calculations.

This commit is contained in:
FireMasterK 2021-05-26 13:54:20 +05:30
parent cba1c4e841
commit 526eefc18c
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
<hr /> <hr />
<div uk-grid> <div uk-grid>
<div class="uk-width-4-5@xl uk-width-3-4@l uk-width-2-3" v-if="comments"> <div class="uk-width-4-5@xl uk-width-3-4@l uk-width-2-3" v-if="comments" ref="comments">
<div <div
class="uk-tile-default uk-align-left uk-width-expand" class="uk-tile-default uk-align-left uk-width-expand"
style="background: #0b0e0f" style="background: #0b0e0f"
@ -167,7 +167,7 @@ export default {
}, },
handleScroll() { handleScroll() {
if (this.loading || !this.comments || !this.comments.nextpage) return; if (this.loading || !this.comments || !this.comments.nextpage) return;
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) { if (window.innerHeight + window.scrollY >= this.$refs.comments.offsetHeight - window.innerHeight) {
this.loading = true; this.loading = true;
this.fetchJson( this.fetchJson(
Constants.BASE_URL + Constants.BASE_URL +