{"action":"created","issue":{"url":"https://api.github.com/repos/vvo/in-viewport/issues/9","labels_url":"https://api.github.com/repos/vvo/in-viewport/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/vvo/in-viewport/issues/9/comments","events_url":"https://api.github.com/repos/vvo/in-viewport/issues/9/events","html_url":"https://github.com/vvo/in-viewport/pull/9","id":73270416,"number":9,"title":"Invisible elements should never considered as \"in the viewport\"","user":{"login":"tzi","id":415891,"avatar_url":"https://avatars.githubusercontent.com/u/415891?v=3","gravatar_id":"","url":"https://api.github.com/users/tzi","html_url":"https://github.com/tzi","followers_url":"https://api.github.com/users/tzi/followers","following_url":"https://api.github.com/users/tzi/following{/other_user}","gists_url":"https://api.github.com/users/tzi/gists{/gist_id}","starred_url":"https://api.github.com/users/tzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzi/subscriptions","organizations_url":"https://api.github.com/users/tzi/orgs","repos_url":"https://api.github.com/users/tzi/repos","events_url":"https://api.github.com/users/tzi/events{/privacy}","received_events_url":"https://api.github.com/users/tzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-05T10:17:50Z","updated_at":"2015-05-13T16:41:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vvo/in-viewport/pulls/9","html_url":"https://github.com/vvo/in-viewport/pull/9","diff_url":"https://github.com/vvo/in-viewport/pull/9.diff","patch_url":"https://github.com/vvo/in-viewport/pull/9.patch"},"body":"Hi @vvo!\r\n\r\nWe currently have a problem with layload/in-viewport: it fires image lazyloading on hidden images.\r\nSo we propose a fix to not fire isInViewport on hidden elements.\r\n\r\nThis come from the `getBoundingClientRect()` method. It always returns  `0, 0, 0, 0` on hidden elements (`display: none` or a parent with `display: none`).\r\nSo all hidden elements are considered as \"is in the viewport\" when the page is loaded.\r\n\r\nThis could be a breaking change, because there is no simple method to detect an hidden element.\r\nWe propose to handle an element with no height and no width as an hidden element.\r\n\r\nWhat do you think about it?\r\n\r\nCheers,\r\nThomas."},"comment":{"url":"https://api.github.com/repos/vvo/in-viewport/issues/comments/101740733","html_url":"https://github.com/vvo/in-viewport/pull/9#issuecomment-101740733","issue_url":"https://api.github.com/repos/vvo/in-viewport/issues/9","id":101740733,"user":{"login":"tzi","id":415891,"avatar_url":"https://avatars.githubusercontent.com/u/415891?v=3","gravatar_id":"","url":"https://api.github.com/users/tzi","html_url":"https://github.com/tzi","followers_url":"https://api.github.com/users/tzi/followers","following_url":"https://api.github.com/users/tzi/following{/other_user}","gists_url":"https://api.github.com/users/tzi/gists{/gist_id}","starred_url":"https://api.github.com/users/tzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzi/subscriptions","organizations_url":"https://api.github.com/users/tzi/orgs","repos_url":"https://api.github.com/users/tzi/repos","events_url":"https://api.github.com/users/tzi/events{/privacy}","received_events_url":"https://api.github.com/users/tzi/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T16:41:15Z","updated_at":"2015-05-13T16:41:15Z","body":"Hi @vvo!\r\n\r\n1/ I used to left a clean things when I'm coding.\r\nDon't know if it's a good or bad habit, but I understand it's confusing.\r\n\r\n2/ The builded library is already commited in the master branch.\r\nWhy should I not updated it?\r\n\r\n3/ The `.gitignore` file could be helpful for the (new) contributors, event if you have a global one.\r\n\r\nWhat do you want me to do about it?\r\nDo I revert the stylistic changes,  the build and the `.gitignore`?\r\n\r\nThis library is really useful! Big thanks for sharing it.\r\nThe code is pretty easy to read and do the job :)\r\nBut for example, it will need a bit more of re-organization to fix the issue like #7.\r\n\r\nCheers,\r\nThomas. "}}