fix: continuously trigger scroll if spinner slot is bigger than scrollParent in Chrome #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DEMO
How to Reproduce
Open the demo in Chrome, wait until the first loading complete. Then scroll to bottom quickly so that the spinner covers the container, you will found it continuously loading data until all data complete.
Description
Generally, the vue-infinite-loading component will be 'pushed' out of viewport as data loading. But if it is bigger than the container, for example, if I use a spinner slot whose height is bigger than the container, it will never be pushed out of viewport until all data complete.
Safari works fine as the scrollTop of container keeps unchanged in this case.
How to Fix
Add an option to reset the scrollTop attribute of the container after loading.