{"action":"created","issue":{"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/867","labels_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/867/labels{/name}","comments_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/867/comments","events_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/867/events","html_url":"https://github.com/dimsemenov/PhotoSwipe/issues/867","id":88901779,"number":867,"title":"pwsp container doesn't close after reloading photoswipe","user":{"login":"haydur","id":1583222,"avatar_url":"https://avatars.githubusercontent.com/u/1583222?v=3","gravatar_id":"","url":"https://api.github.com/users/haydur","html_url":"https://github.com/haydur","followers_url":"https://api.github.com/users/haydur/followers","following_url":"https://api.github.com/users/haydur/following{/other_user}","gists_url":"https://api.github.com/users/haydur/gists{/gist_id}","starred_url":"https://api.github.com/users/haydur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haydur/subscriptions","organizations_url":"https://api.github.com/users/haydur/orgs","repos_url":"https://api.github.com/users/haydur/repos","events_url":"https://api.github.com/users/haydur/events{/privacy}","received_events_url":"https://api.github.com/users/haydur/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/labels/Implementation%20Question","name":"Implementation Question","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-17T03:36:11Z","updated_at":"2015-07-03T03:38:13Z","closed_at":null,"body":"After successfully loading additional slide elements using masonry, I redo PhotoSwipe to add the new elements.\r\n\r\nAll is well, except when I open the the galley next, the \"pwsp\" div container doesn't fully close or \"lose\" the additional classes, making some slide elements unclickable.\r\n\r\nYou can see this issue in action at http://dayswithshy.com/:\r\n* Click on load more at the bottom to load additional elements.\r\n* Open gallery by clicking on any photo.\r\n* Click the gallery.\r\n* Scroll to the top of the photo list and try clicking on a photo in the top center area.\r\n\r\nAfter closing gallery (step 3 above), the pwsp container element remains like this:\r\n```\r\n<div class=\"pswp pswp--supports-fs pswp--open pswp--animate_opacity pswp--notouch pswp--css_animation pswp--svg pswp--animated-in pswp--zoom-allowed pswp--visible\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\" style=\"\".\r\n```\r\n\r\nSome slide elements still remain clickable, but even on those some items break, like the fullscreen option button."},"comment":{"url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/comments/118222602","html_url":"https://github.com/dimsemenov/PhotoSwipe/issues/867#issuecomment-118222602","issue_url":"https://api.github.com/repos/dimsemenov/PhotoSwipe/issues/867","id":118222602,"user":{"login":"prohtex","id":12946938,"avatar_url":"https://avatars.githubusercontent.com/u/12946938?v=3","gravatar_id":"","url":"https://api.github.com/users/prohtex","html_url":"https://github.com/prohtex","followers_url":"https://api.github.com/users/prohtex/followers","following_url":"https://api.github.com/users/prohtex/following{/other_user}","gists_url":"https://api.github.com/users/prohtex/gists{/gist_id}","starred_url":"https://api.github.com/users/prohtex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prohtex/subscriptions","organizations_url":"https://api.github.com/users/prohtex/orgs","repos_url":"https://api.github.com/users/prohtex/repos","events_url":"https://api.github.com/users/prohtex/events{/privacy}","received_events_url":"https://api.github.com/users/prohtex/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T03:38:13Z","updated_at":"2015-07-03T03:38:13Z","body":"Thanks, that worked! However, now I am finding that I cannot get the gallery to launch from the URL. For example, visiting\r\nhttp://www.thing.gallery/#&gid=front&pid=4\r\nDoes not launch PS. However, clicking on any element will launch the gallery and load the requested slide. Previously, I had used this workaround to get the gallery to launch from the URL this way:\r\n\r\n\tif (window.location.hash) {\r\n\t\tdocument.getElementById('item-1').click()\r\n\t\t}\r\n\r\nBut it seems like there must be a better way to do this!"}}