Skip to content

Fixes issue with suggestions element scroll position#23

Open
DallasEpperson wants to merge 1 commit intoOne-com:masterfrom
DallasEpperson:topOffsetIssue
Open

Fixes issue with suggestions element scroll position#23
DallasEpperson wants to merge 1 commit intoOne-com:masterfrom
DallasEpperson:topOffsetIssue

Conversation

@DallasEpperson
Copy link

@DallasEpperson DallasEpperson commented Apr 11, 2018

The issue stems from using document.body.scrollTop. That function has been deprecated in modern browsers and seems to always return 0, no matter the scroll position of the viewport.

Replaced with window.pageYOffset, but gracefully falls back to older functions if needed. This fixes #22.

…as been deprecated in favor of window.pageYOffset.
@DallasEpperson
Copy link
Author

@hanstdam would you mind taking a look at this for me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestions element not respecting window scroll position

1 participant