Skip to content

bug: scrollToBottom可能会导致无限循环执行 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joyexpr opened this issue Mar 25, 2023 · 1 comment
Open

bug: scrollToBottom可能会导致无限循环执行 #13

joyexpr opened this issue Mar 25, 2023 · 1 comment

Comments

@joyexpr
Copy link

joyexpr commented Mar 25, 2023

bug: scrollToBottom可能会导致无限循环执行,导致列表一直在底部无法向上拉

tangbc/vue-virtual-scroll-list@feb2135

setTimeout(() => {
          if (this.getOffset() + this.getClientSize()  < this.getScrollSize()) {
            this.scrollToBottom()
          }
        }, 3)

应该改为

setTimeout(() => {
          if (this.getOffset() + this.getClientSize() + 1 < this.getScrollSize()) {
            this.scrollToBottom()
          }
        }, 3)
@MengQingYu1998
Copy link

image
可以在自己的项目里这样写,不必去改他的源码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants