Thanks to visit codestin.com
Credit goes to github.com

Skip to content

为什么虚拟滚动到底部,加载数据后,会出现整个虚拟滚动往上跳动呢? #285

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

Closed
LLLLLamHo opened this issue Nov 13, 2020 · 5 comments
Labels

Comments

@LLLLLamHo
Copy link

Describe

滚动到底部后触发tobottom,然后加载数据,数据加载后,会出现虚拟滚动区域跳动到其他地方,非第一屏的底部位置

Other

  • Version 2.3.1
  • Browser phone(chrome, safari)
@LLLLLamHo LLLLLamHo added the bug label Nov 13, 2020
@tangbc
Copy link
Owner

tangbc commented Nov 14, 2020

来个 demo 吧,不然不好查

@LLLLLamHo
Copy link
Author

https://tangbc.github.io/vue-virtual-scroll-list/#/infinite-loading
你自己的官网demo在手机上,例如iphone里面用微信或者safari打开,就会看到在多滚动几个屏幕后,就会出现白屏的情况了

@azhengyongqin
Copy link

@tangbc
就是项目Readme里面那个实例,运行就是这个bug

@tangbc
Copy link
Owner

tangbc commented Dec 2, 2020

#278 原因大概是这个,iOS 会回弹,导致方向判断错误,暂时还没有想到两全的解决办法,后面有时间在看了。

@tangbc tangbc closed this as completed Apr 2, 2021
@TinaSprunt
Copy link

TinaSprunt commented Nov 9, 2023

@tangbc web端谷歌浏览器也出现这个问题,比如单页100条,触底获取下一页数据。
几百条的没问题,几千条就会发生滚动条位置乱跳的情况(获取完数据后,滚动条位置不在上次的位置,直接跳回顶部),请问现在这个问题有什么进展吗?或者解决思路

示例:每次在获取数据后,都调用this.$refs.virtualListRef.getOffset()获取当前偏移量,但有时候获取不到真实的偏移量,会拿到0

获取数据后,打印当前 getOffset 及 getScrollSize的值
5

实际元素高度
6

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

No branches or pull requests

4 participants