{"action":"created","issue":{"url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/95","repository_url":"https://api.github.com/repos/WICG/IntersectionObserver","labels_url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/95/comments","events_url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/95/events","html_url":"https://github.com/WICG/IntersectionObserver/issues/95","id":132237198,"number":95,"title":"Use visual viewport instead of layout viewport for root intersection rectangle?","user":{"login":"ChumpChief","id":4276348,"avatar_url":"https://avatars.githubusercontent.com/u/4276348?v=3","gravatar_id":"","url":"https://api.github.com/users/ChumpChief","html_url":"https://github.com/ChumpChief","followers_url":"https://api.github.com/users/ChumpChief/followers","following_url":"https://api.github.com/users/ChumpChief/following{/other_user}","gists_url":"https://api.github.com/users/ChumpChief/gists{/gist_id}","starred_url":"https://api.github.com/users/ChumpChief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChumpChief/subscriptions","organizations_url":"https://api.github.com/users/ChumpChief/orgs","repos_url":"https://api.github.com/users/ChumpChief/repos","events_url":"https://api.github.com/users/ChumpChief/events{/privacy}","received_events_url":"https://api.github.com/users/ChumpChief/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WICG/IntersectionObserver/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/WICG/IntersectionObserver/milestones/3","html_url":"https://github.com/WICG/IntersectionObserver/milestones/Spec%20V2","labels_url":"https://api.github.com/repos/WICG/IntersectionObserver/milestones/3/labels","id":1296748,"number":3,"title":"Spec V2","description":"","creator":{"login":"slightlyoff","id":97331,"avatar_url":"https://avatars.githubusercontent.com/u/97331?v=3","gravatar_id":"","url":"https://api.github.com/users/slightlyoff","html_url":"https://github.com/slightlyoff","followers_url":"https://api.github.com/users/slightlyoff/followers","following_url":"https://api.github.com/users/slightlyoff/following{/other_user}","gists_url":"https://api.github.com/users/slightlyoff/gists{/gist_id}","starred_url":"https://api.github.com/users/slightlyoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slightlyoff/subscriptions","organizations_url":"https://api.github.com/users/slightlyoff/orgs","repos_url":"https://api.github.com/users/slightlyoff/repos","events_url":"https://api.github.com/users/slightlyoff/events{/privacy}","received_events_url":"https://api.github.com/users/slightlyoff/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-09-08T23:03:03Z","updated_at":"2016-03-04T06:25:06Z","due_on":"2016-09-30T07:00:00Z","closed_at":null},"comments":6,"created_at":"2016-02-08T19:36:52Z","updated_at":"2016-03-14T18:35:20Z","closed_at":null,"body":"The definition of the root intersection rectangle specifies that for intersection roots which are document viewports, it is specifically the layout viewport.\r\n\r\nI think this should instead be the visual viewport to better align with the stated goal in the spec of \"calculating element visibility\".\r\n\r\nThere is a corresponding note that this choice was intentional, implying there was intent of keeping the root intersection rectangle closely related to layout dimensions (specifying that pinch zoom changes neither).  If that is still true and this change is rejected, then the relationship between IntersectionObserver and layout dimensions should be better explained.  The goals outlined in the spec currently sound more relevant to \"what the user sees\" than \"how the page is laid out\".\r\n\r\nI would also be concerned that leaving this as the layout viewport would leave the \"exotic plugin-based solutions\" for ad impression tracking as more-effective than IntersectionObserver and discourage uptake.\r\n\r\nAlternatively, if there are scenarios which require intersection against the layout viewport, then an option to specify layout vs. visual viewport as the root intersection rectangle could be interesting."},"comment":{"url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/comments/196460771","html_url":"https://github.com/WICG/IntersectionObserver/issues/95#issuecomment-196460771","issue_url":"https://api.github.com/repos/WICG/IntersectionObserver/issues/95","id":196460771,"user":{"login":"mpb","id":8249221,"avatar_url":"https://avatars.githubusercontent.com/u/8249221?v=3","gravatar_id":"","url":"https://api.github.com/users/mpb","html_url":"https://github.com/mpb","followers_url":"https://api.github.com/users/mpb/followers","following_url":"https://api.github.com/users/mpb/following{/other_user}","gists_url":"https://api.github.com/users/mpb/gists{/gist_id}","starred_url":"https://api.github.com/users/mpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpb/subscriptions","organizations_url":"https://api.github.com/users/mpb/orgs","repos_url":"https://api.github.com/users/mpb/repos","events_url":"https://api.github.com/users/mpb/events{/privacy}","received_events_url":"https://api.github.com/users/mpb/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T18:35:20Z","updated_at":"2016-03-14T18:35:20Z","body":"As far as I know, the visual viewport vs layout viewport distinction is mostly relevant for non-mobile-optimized pages on mobile devices where \"pinch zoom\" is used. In this situation, none of the \"exotic plugin-based solutions\" should be viable, since Flash would not be available in this scenario. So that would not be a reason for people to halt adoption of intersection observer for viewability use-cases.\r\nUnless anyone can point out a situation where the visual/layout distinction is relevant and there are plugin solutions available."}}