PeachScript / vue-infinite-loading

An infinite scroll plugin for Vue.js.
https://peachscript.github.io/vue-infinite-loading/
MIT License
2.67k stars 368 forks source link

fix: Safari scrollTop #243

Closed malinbranduse closed 3 months ago

malinbranduse commented 5 years ago

direction="top" on Safari was not preserving scroll after prepending new items because scrollTop is always 0 on the body in Safari. Tracked it down to this small little tweak. Tested on Chrome and Safari.

codecov[bot] commented 5 years ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (master@ccf1a20). Learn more about missing BASE report. Report is 7 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #243 +/- ## ========================================== Coverage ? 100.00% ========================================== Files ? 5 Lines ? 174 Branches ? 32 ========================================== Hits ? 174 Misses ? 0 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

re757575 commented 5 years ago

It works for me #256, but is document.scrollingElement