Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect visibility calculation with {force: false, offset: nonZero} #138

Closed
nburlett opened this issue Apr 11, 2019 · 1 comment · Fixed by #139 or rundeck/rundeck#5825
Closed
Labels

Comments

@nburlett
Copy link
Contributor

The scroller can incorrectly decide that an element is already visible when
specifying {force: false, offset: nonZero}. The code checks if targetY is
within the current visible portion of container, but targetY has the
offset applied already.

*------------*
| container  |
| above      |
*~ ~ ~ ~ ~ ~ * container top
|            |
| visible    |
| area       |
|            | <-| 
|            |   |
|            |   |
|            |   | skips scrolling if elm
*~ ~ ~ ~ ~ ~ *   | is within this area
| *-------*  |   | 
| | elm   |  |   |
| *-------*  |   |
|            | <-|
| container  |
| below      |
*------------*
nburlett added a commit to nburlett/vue-scrollto that referenced this issue Apr 11, 2019
Undo the pre-applied offset when calculating whether the element is already
visible (and therefore we shouldn't scroll).

Fixes rigor789#138
rigor789 pushed a commit that referenced this issue Sep 10, 2019
Undo the pre-applied offset when calculating whether the element is already
visible (and therefore we shouldn't scroll).

Fixes #138
@rigor789
Copy link
Owner

🎉 This issue has been resolved in version 2.16.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants