KoryNunn/scroll-into-view

When there is nothing to scroll, callback should be called immediately

Closed this issue · 2 comments

When there is nothing to scroll i.e. there are no scrollbars or element is already in the view, I expect callback function to trigger immediately, instead it waits for time set value to complete

This sounds reasonable and expected.

This is the existing behavior, I added a test for it: https://github.com/KoryNunn/scroll-into-view/blob/master/test/test.js#L374

If you find an issue, please open a PR with a failing test.