ElemeFE / vue-infinite-scroll

An infinite scroll directive for vue.js.
2.86k stars 417 forks source link

Passive scroll listener #157

Open nachogarcia opened 2 years ago

nachogarcia commented 2 years ago

Using this library causes the following performance issue, reported in Google Lighthouse:

Does not use passive listeners to improve scrolling performance

I guess this would be simply fixed by using { passive: true } in https://github.com/ElemeFE/vue-infinite-scroll/blob/775b7d386ff4e609eb3360a4ccecee7d9a015c63/src/directive.js#L108

I don't think we would need to pass an option for this since the use for an infinite scroll is not to prevent scrolling.