react-available-times icon indicating copy to clipboard operation
react-available-times copied to clipboard

document.body.scrollTop deprecated

Open yosoyadri opened this issue 8 years ago • 1 comments

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!

yosoyadri avatar Jan 24 '18 22:01 yosoyadri

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.

trotzig avatar Jan 26 '18 07:01 trotzig