Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

document.body.scrollTop deprecated #5

Open
yosoyadri opened this issue Jan 24, 2018 · 1 comment
Open

document.body.scrollTop deprecated #5

yosoyadri opened this issue Jan 24, 2018 · 1 comment

Comments

@yosoyadri
Copy link

yosoyadri commented Jan 24, 2018

I would submit a PR but this is probably a 2 minutes job for you to correct.

In line https://github.com/trotzig/react-available-times/blob/master/src/Day.jsx#L49 to support all browsers and correct/future implementations should be something like:

const realY = pageY - top - (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);

Reference: http://lists.w3.org/Archives/Public/www-style/2013Oct/0287.html

Great job btw!

@trotzig
Copy link
Owner

trotzig commented Jan 26, 2018

Good catch! Although this would be a quick fix, want to make a PR anyway? The reason I ask is because it would give the project some weight having outside contributors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants