{"action":"created","issue":{"url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/32","repository_url":"https://api.github.com/repos/researchgate/react-intersection-observer","labels_url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/32/comments","events_url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/32/events","html_url":"https://github.com/researchgate/react-intersection-observer/issues/32","id":319633707,"number":32,"title":"onlyOnce ambiguous behavior on first event","user":{"login":"jayalfredprufrock","id":415763,"avatar_url":"https://avatars1.githubusercontent.com/u/415763?v=4","gravatar_id":"","url":"https://api.github.com/users/jayalfredprufrock","html_url":"https://github.com/jayalfredprufrock","followers_url":"https://api.github.com/users/jayalfredprufrock/followers","following_url":"https://api.github.com/users/jayalfredprufrock/following{/other_user}","gists_url":"https://api.github.com/users/jayalfredprufrock/gists{/gist_id}","starred_url":"https://api.github.com/users/jayalfredprufrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayalfredprufrock/subscriptions","organizations_url":"https://api.github.com/users/jayalfredprufrock/orgs","repos_url":"https://api.github.com/users/jayalfredprufrock/repos","events_url":"https://api.github.com/users/jayalfredprufrock/events{/privacy}","received_events_url":"https://api.github.com/users/jayalfredprufrock/received_events","type":"User","site_admin":false},"labels":[{"id":659795204,"url":"https://api.github.com/repos/researchgate/react-intersection-observer/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"Rendez","id":61776,"avatar_url":"https://avatars0.githubusercontent.com/u/61776?v=4","gravatar_id":"","url":"https://api.github.com/users/Rendez","html_url":"https://github.com/Rendez","followers_url":"https://api.github.com/users/Rendez/followers","following_url":"https://api.github.com/users/Rendez/following{/other_user}","gists_url":"https://api.github.com/users/Rendez/gists{/gist_id}","starred_url":"https://api.github.com/users/Rendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rendez/subscriptions","organizations_url":"https://api.github.com/users/Rendez/orgs","repos_url":"https://api.github.com/users/Rendez/repos","events_url":"https://api.github.com/users/Rendez/events{/privacy}","received_events_url":"https://api.github.com/users/Rendez/received_events","type":"User","site_admin":false},"assignees":[{"login":"Rendez","id":61776,"avatar_url":"https://avatars0.githubusercontent.com/u/61776?v=4","gravatar_id":"","url":"https://api.github.com/users/Rendez","html_url":"https://github.com/Rendez","followers_url":"https://api.github.com/users/Rendez/followers","following_url":"https://api.github.com/users/Rendez/following{/other_user}","gists_url":"https://api.github.com/users/Rendez/gists{/gist_id}","starred_url":"https://api.github.com/users/Rendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rendez/subscriptions","organizations_url":"https://api.github.com/users/Rendez/orgs","repos_url":"https://api.github.com/users/Rendez/repos","events_url":"https://api.github.com/users/Rendez/events{/privacy}","received_events_url":"https://api.github.com/users/Rendez/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-05-02T16:56:48Z","updated_at":"2018-05-15T22:03:51Z","closed_at":null,"author_association":"NONE","body":"## Expected behavior\r\nI expect when using `onlyOnce` option that unobserving should happen only after the observed item becomes visible, based on the threshold parameter (or in the case of an array of thresholds, when the _first_  threshold is met)\r\n\r\n## Current behavior\r\nIn latest version of Chrome, the component stops observing even though the item is never visible. This is because Chrome can emit an event such that `isIntersecting` is true but `intersectionRatio` is still 0. I believe the spec requires that `isIntersecting` be true _and_ `intersectionRatio > 0` for something to be considered visible.\r\n\r\n## Steps to reproduce\r\nNot sure exactly how to recreate the conditions necessary for Chrome to emit such an event...\r\n\r\n* **Version**:  latest\r\n\r\nAdding an additional condition before unobserving here: \r\n\r\nhttps://github.com/researchgate/react-intersection-observer/blob/69e297f895188177fc8c5f9345ffb152e6e43866/src/IntersectionObserver.js#L114\r\n\r\nto also check for `intersectionRatio != 0` fixed the issue for me."},"comment":{"url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/comments/389328095","html_url":"https://github.com/researchgate/react-intersection-observer/issues/32#issuecomment-389328095","issue_url":"https://api.github.com/repos/researchgate/react-intersection-observer/issues/32","id":389328095,"user":{"login":"jayalfredprufrock","id":415763,"avatar_url":"https://avatars1.githubusercontent.com/u/415763?v=4","gravatar_id":"","url":"https://api.github.com/users/jayalfredprufrock","html_url":"https://github.com/jayalfredprufrock","followers_url":"https://api.github.com/users/jayalfredprufrock/followers","following_url":"https://api.github.com/users/jayalfredprufrock/following{/other_user}","gists_url":"https://api.github.com/users/jayalfredprufrock/gists{/gist_id}","starred_url":"https://api.github.com/users/jayalfredprufrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayalfredprufrock/subscriptions","organizations_url":"https://api.github.com/users/jayalfredprufrock/orgs","repos_url":"https://api.github.com/users/jayalfredprufrock/repos","events_url":"https://api.github.com/users/jayalfredprufrock/events{/privacy}","received_events_url":"https://api.github.com/users/jayalfredprufrock/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T22:03:51Z","updated_at":"2018-05-15T22:03:51Z","author_association":"NONE","body":"Nice work! I think this is a solid improvement. I too am curious about the iframe/root margin intended behavior. I guess we'll see what they say over there."}}
{"actor":{"display_login":"jayalfredprufrock"}}