Zecat / iron-scroll-spy

Auto select the current item in the viewport as the user scroll
9 stars 1 forks source link

Quick scroll and "selected" update latency #3

Closed Zecat closed 8 years ago

Zecat commented 8 years ago

The selected value is not updated correctly at the end of a quick scroll, because, for performance reason, the '_scrollSpyCheck' method is debounced every 200ms. A solution could be to check when the scroll stops and recompute the selected value.

Zecat commented 8 years ago

Actually, it's best if _scrollSpyCheck is recursive, so if a check occurred in _scrollSpyCheck, the method will be called again.