dillon1000/react

Commit

Forward Compatibility w/ WebKit & Blink

Newer versions of WebKit and Blink will support both `document.body.scrollTop` and `document.documentElement.scrollTop`. Therefore, implementing cross-browser compatibility by summing the two will no longer work.

This changes React to use `getUnboundedScrollPosition` so we get the fix and consistency in one change!

See: https://rniwa.com/2013-10-29/web-compatibility-story-of-scrolltop-and-scrollleft/
Browse files
Changed paths3 files
First-parent comparison
M src/dom/ViewportMetrics.js ModifiedA src/vendor/core/dom/getDocumentScrollElement.js AddedA src/vendor/core/dom/getUnboundedScrollPosition.js Added
Patch

Files changed

Rendering syntax-highlighted changes…