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

fix: check intersectionRatio in addition to isIntersecting #384

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

thebuilder
Copy link
Owner

This uses intersectionRatio to determine if a component is inView, instead of relying on `isIntersecting.

Closes #383

@vercel
Copy link

vercel bot commented Sep 9, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/the-builder/react-intersection-observer/rfwqy2ted
✅ Preview: https://react-intersection-observer-git-fix-firefox-intersectionratio.the-builder.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 17bf4bf:

Sandbox Source
react-intersection-observer Configuration

@thebuilder thebuilder merged commit 0252048 into master Sep 9, 2020
@thebuilder thebuilder deleted the fix/firefox-intersectionratio branch September 9, 2020 14:07
@thebuilder
Copy link
Owner Author

🎉 This PR is included in version 8.28.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@szager-chromium
Copy link

Hello -- I'm the original implementer and spec editor of IntersectionObserver, and I recently stumbled across this issue.

This is indeed a subtle and thorny issue. I filed a bug in the spec repository a while back, but I've had difficulty getting traction for a proposed fix. It would be very helpful if the maintainer of a widely-used library which has encountered the problem could chime in...

w3c/IntersectionObserver#432

Thanks!

@thebuilder
Copy link
Owner Author

@szager-chromium could this issue also be related to #513 ?

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

Successfully merging this pull request may close these issues.

inView not working with Firefox after upgrade from 8.27.1 to 8.28.1
2 participants