{"action":"created","comment":{"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/comments/46468848","id":46468848,"diff_hunk":"@@ -76,15 +76,15 @@ var _gestureStartTime,\n \t_canPan = function() {\n \t\treturn !(_options.scaleMode === 'fit' && _currZoomLevel ===  self.currItem.initialZoomLevel);\n \t},\n-\t\n+\n \t// find the closest parent DOM element\n \t_closestElement = function(el, fn) {\n-\t  \tif(!el) {\n+\t  \tif(!el || el == document) {","path":"src/js/gestures.js","position":9,"original_position":9,"commit_id":"9e7773e55b17a2a614fe380bae2636499679a1ba","original_commit_id":"9e7773e55b17a2a614fe380bae2636499679a1ba","user":{"login":"karlhungus","id":64263,"avatar_url":"https://avatars.githubusercontent.com/u/64263?v=3","gravatar_id":"","url":"https://api.github.com/users/karlhungus","html_url":"https://github.com/karlhungus","followers_url":"https://api.github.com/users/karlhungus/followers","following_url":"https://api.github.com/users/karlhungus/following{/other_user}","gists_url":"https://api.github.com/users/karlhungus/gists{/gist_id}","starred_url":"https://api.github.com/users/karlhungus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlhungus/subscriptions","organizations_url":"https://api.github.com/users/karlhungus/orgs","repos_url":"https://api.github.com/users/karlhungus/repos","events_url":"https://api.github.com/users/karlhungus/events{/privacy}","received_events_url":"https://api.github.com/users/karlhungus/received_events","type":"User","site_admin":false},"body":"err should this be `===`","created_at":"2015-12-02T20:14:38Z","updated_at":"2015-12-02T20:14:38Z","html_url":"https://github.com/dimsemenov/PhotoSwipe/pull/1037#discussion_r46468848","pull_request_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037","_links":{"self":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/comments/46468848"},"html":{"href":"https://github.com/dimsemenov/PhotoSwipe/pull/1037#discussion_r46468848"},"pull_request":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037"}}},"pull_request":{"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037","id":52445464,"html_url":"https://github.com/dimsemenov/PhotoSwipe/pull/1037","diff_url":"https://github.com/dimsemenov/PhotoSwipe/pull/1037.diff","patch_url":"https://github.com/dimsemenov/PhotoSwipe/pull/1037.patch","issue_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/1037","number":1037,"state":"open","locked":false,"title":"SvgAnimatedString no className","user":{"login":"karlhungus","id":64263,"avatar_url":"https://avatars.githubusercontent.com/u/64263?v=3","gravatar_id":"","url":"https://api.github.com/users/karlhungus","html_url":"https://github.com/karlhungus","followers_url":"https://api.github.com/users/karlhungus/followers","following_url":"https://api.github.com/users/karlhungus/following{/other_user}","gists_url":"https://api.github.com/users/karlhungus/gists{/gist_id}","starred_url":"https://api.github.com/users/karlhungus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlhungus/subscriptions","organizations_url":"https://api.github.com/users/karlhungus/orgs","repos_url":"https://api.github.com/users/karlhungus/repos","events_url":"https://api.github.com/users/karlhungus/events{/privacy}","received_events_url":"https://api.github.com/users/karlhungus/received_events","type":"User","site_admin":false},"body":"We use a svg icon for our close icon, this can cause an error when asking those elements for className. `getAttribute(\"class\")` seems to work in all cases, except when the closest look up is hits a `document` -- This one is especially hard to trigger (you must be zoomed into an image and swiping.\r\n\r\nRelavent HTML\r\n\r\n```html\r\n<div class=\"pswp\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\r\n  <div class=\"pswp__bg\"></div>\r\n  <div class=\"pswp__scroll-wrap\">\r\n    <div class=\"pswp__container\">\r\n        <div class=\"pswp__item\"></div>\r\n        <div class=\"pswp__item\"></div>\r\n        <div class=\"pswp__item\"></div>\r\n    </div>\r\n    <div class=\"pswp__ui pswp__ui--hidden\">\r\n      <div class=\"pswp__top-bar\">\r\n        <button class=\"pswp__close-button\">\r\n          <svg class=\"icon icon--close icon--16 icon--white\"><use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"#icon--close\"></use><image src=\"/assets/icon--close-white.png\"></image></svg>\r\n        </button>\r\n\r\n        <div class=\"pswp__preloader\">\r\n          <div class=\"pswp__preloader__icn\">\r\n            <div class=\"pswp__preloader__cut\">\r\n              <div class=\"pswp__preloader__donut\"></div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n\r\n      <button class=\"pswp__button pswp__button--arrow--left\" title=\"Previous (arrow left)\"></button>\r\n      <button class=\"pswp__button pswp__button--arrow--right\" title=\"Next (arrow right)\"></button>\r\n    </div>\r\n  </div>\r\n</div>\r\n```\r\n\r\n\r\nIf the whitespace removal is not :cool: let me know, i'll remove it (I intended to have it in a separate commit but I must have fat fingered it.","created_at":"2015-12-02T19:54:30Z","updated_at":"2015-12-02T20:14:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2c94b133abd66b0762bc878c6080318c739feef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037/commits","review_comments_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037/comments","review_comment_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/1037/comments","statuses_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/statuses/9e7773e55b17a2a614fe380bae2636499679a1ba","head":{"label":"karlhungus:svganimatedstring_no_className","ref":"svganimatedstring_no_className","sha":"9e7773e55b17a2a614fe380bae2636499679a1ba","user":{"login":"karlhungus","id":64263,"avatar_url":"https://avatars.githubusercontent.com/u/64263?v=3","gravatar_id":"","url":"https://api.github.com/users/karlhungus","html_url":"https://github.com/karlhungus","followers_url":"https://api.github.com/users/karlhungus/followers","following_url":"https://api.github.com/users/karlhungus/following{/other_user}","gists_url":"https://api.github.com/users/karlhungus/gists{/gist_id}","starred_url":"https://api.github.com/users/karlhungus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlhungus/subscriptions","organizations_url":"https://api.github.com/users/karlhungus/orgs","repos_url":"https://api.github.com/users/karlhungus/repos","events_url":"https://api.github.com/users/karlhungus/events{/privacy}","received_events_url":"https://api.github.com/users/karlhungus/received_events","type":"User","site_admin":false},"repo":{"id":47283239,"name":"PhotoSwipe","full_name":"karlhungus/PhotoSwipe","owner":{"login":"karlhungus","id":64263,"avatar_url":"https://avatars.githubusercontent.com/u/64263?v=3","gravatar_id":"","url":"https://api.github.com/users/karlhungus","html_url":"https://github.com/karlhungus","followers_url":"https://api.github.com/users/karlhungus/followers","following_url":"https://api.github.com/users/karlhungus/following{/other_user}","gists_url":"https://api.github.com/users/karlhungus/gists{/gist_id}","starred_url":"https://api.github.com/users/karlhungus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlhungus/subscriptions","organizations_url":"https://api.github.com/users/karlhungus/orgs","repos_url":"https://api.github.com/users/karlhungus/repos","events_url":"https://api.github.com/users/karlhungus/events{/privacy}","received_events_url":"https://api.github.com/users/karlhungus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karlhungus/PhotoSwipe","description":"JavaScript image gallery for mobile and desktop, modular, framework independent","fork":true,"url":"https://api.github.com/repos/karlhungus/PhotoSwipe","forks_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/forks","keys_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/teams","hooks_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/hooks","issue_events_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/issues/events{/number}","events_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/events","assignees_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/assignees{/user}","branches_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/branches{/branch}","tags_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/tags","blobs_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/statuses/{sha}","languages_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/languages","stargazers_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/stargazers","contributors_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/contributors","subscribers_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/subscribers","subscription_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/subscription","commits_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/contents/{+path}","compare_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/merges","archive_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/downloads","issues_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/issues{/number}","pulls_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/pulls{/number}","milestones_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/milestones{/number}","notifications_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/labels{/name}","releases_url":"https://api.github.com/repos/karlhungus/PhotoSwipe/releases{/id}","created_at":"2015-12-02T19:26:17Z","updated_at":"2015-12-02T19:26:19Z","pushed_at":"2015-12-02T20:09:39Z","git_url":"git://github.com/karlhungus/PhotoSwipe.git","ssh_url":"git@github.com:karlhungus/PhotoSwipe.git","clone_url":"https://github.com/karlhungus/PhotoSwipe.git","svn_url":"https://github.com/karlhungus/PhotoSwipe","homepage":"http://photoswipe.com","size":28003,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dimsemenov:master","ref":"master","sha":"10dbbb79596d8e90808c729199f5ea409071ae33","user":{"login":"dimsemenov","id":1061115,"avatar_url":"https://avatars.githubusercontent.com/u/1061115?v=3","gravatar_id":"","url":"https://api.github.com/users/dimsemenov","html_url":"https://github.com/dimsemenov","followers_url":"https://api.github.com/users/dimsemenov/followers","following_url":"https://api.github.com/users/dimsemenov/following{/other_user}","gists_url":"https://api.github.com/users/dimsemenov/gists{/gist_id}","starred_url":"https://api.github.com/users/dimsemenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimsemenov/subscriptions","organizations_url":"https://api.github.com/users/dimsemenov/orgs","repos_url":"https://api.github.com/users/dimsemenov/repos","events_url":"https://api.github.com/users/dimsemenov/events{/privacy}","received_events_url":"https://api.github.com/users/dimsemenov/received_events","type":"User","site_admin":false},"repo":{"id":1580851,"name":"PhotoSwipe","full_name":"dimsemenov/PhotoSwipe","owner":{"login":"dimsemenov","id":1061115,"avatar_url":"https://avatars.githubusercontent.com/u/1061115?v=3","gravatar_id":"","url":"https://api.github.com/users/dimsemenov","html_url":"https://github.com/dimsemenov","followers_url":"https://api.github.com/users/dimsemenov/followers","following_url":"https://api.github.com/users/dimsemenov/following{/other_user}","gists_url":"https://api.github.com/users/dimsemenov/gists{/gist_id}","starred_url":"https://api.github.com/users/dimsemenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimsemenov/subscriptions","organizations_url":"https://api.github.com/users/dimsemenov/orgs","repos_url":"https://api.github.com/users/dimsemenov/repos","events_url":"https://api.github.com/users/dimsemenov/events{/privacy}","received_events_url":"https://api.github.com/users/dimsemenov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dimsemenov/PhotoSwipe","description":"JavaScript image gallery for mobile and desktop, modular, framework independent","fork":false,"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe","forks_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/forks","keys_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/teams","hooks_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/hooks","issue_events_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/events{/number}","events_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/events","assignees_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/assignees{/user}","branches_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/branches{/branch}","tags_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/tags","blobs_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/statuses/{sha}","languages_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/languages","stargazers_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/stargazers","contributors_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/contributors","subscribers_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/subscribers","subscription_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/subscription","commits_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/contents/{+path}","compare_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/merges","archive_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/downloads","issues_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues{/number}","pulls_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls{/number}","milestones_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/milestones{/number}","notifications_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/labels{/name}","releases_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/releases{/id}","created_at":"2011-04-07T05:46:29Z","updated_at":"2015-12-02T18:27:52Z","pushed_at":"2015-12-02T20:09:39Z","git_url":"git://github.com/dimsemenov/PhotoSwipe.git","ssh_url":"git@github.com:dimsemenov/PhotoSwipe.git","clone_url":"https://github.com/dimsemenov/PhotoSwipe.git","svn_url":"https://github.com/dimsemenov/PhotoSwipe","homepage":"http://photoswipe.com","size":28457,"stargazers_count":9844,"watchers_count":9844,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1311,"mirror_url":null,"open_issues_count":117,"forks":1311,"open_issues":117,"watchers":9844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037"},"html":{"href":"https://github.com/dimsemenov/PhotoSwipe/pull/1037"},"issue":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/1037"},"comments":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/1037/comments"},"review_comments":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037/comments"},"review_comment":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/pulls/1037/commits"},"statuses":{"href":"https://api.github.com/repos/dimsemenov/PhotoSwipe/statuses/9e7773e55b17a2a614fe380bae2636499679a1ba"}}}}