{"action":"created","issue":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6790","labels_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6790/labels{/name}","comments_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6790/comments","events_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6790/events","html_url":"https://github.com/wet-boew/wet-boew/issues/6790","id":80593958,"number":6790,"title":"Opening popup on UpdatePanel postback causes jquery.magnific-popup.min.js to be reloaded multiple times","user":{"login":"GarthMartin","id":11050106,"avatar_url":"https://avatars.githubusercontent.com/u/11050106?v=3","gravatar_id":"","url":"https://api.github.com/users/GarthMartin","html_url":"https://github.com/GarthMartin","followers_url":"https://api.github.com/users/GarthMartin/followers","following_url":"https://api.github.com/users/GarthMartin/following{/other_user}","gists_url":"https://api.github.com/users/GarthMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/GarthMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GarthMartin/subscriptions","organizations_url":"https://api.github.com/users/GarthMartin/orgs","repos_url":"https://api.github.com/users/GarthMartin/repos","events_url":"https://api.github.com/users/GarthMartin/events{/privacy}","received_events_url":"https://api.github.com/users/GarthMartin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-25T16:47:40Z","updated_at":"2015-05-25T17:18:24Z","closed_at":null,"body":"I have a couple update panels on a page which postback, saving or deleting data on the server.  Using the PageRequestManager I add an event to check for a flag that indicates if we should show a success dialog.  If so I open the dialog as follows:\r\n\r\n```javascript\r\n// show our success dialog box\r\n    if (ShowSuccessDialog()) {\r\n        wb.doc.trigger(\"open.wb-lbx\", [[{ src: '#SaveSuccessfulDialog', type: 'inline' }], true]);\r\n        wb.doc.on(\"click\", \"#SaveDialogOKClose\", function () {\r\n            ResetAllSuccessFlags();\r\n        });\r\n    }\r\n```\r\n\r\nFor some reason every time the popup gets triggered, another copy of jquery.magnific-popup.min.js seems to be loaded into the browser memory.  After about 5 or 6 round trips to the server, the browser just bogs down and is not responsive.\r\n\r\nIs there another way I should be opening/initing the popup?  I am using the popup this way on numerous other pages with no problems, but without UpdatePanels.\r\n\r\nThe rendered markup for the popup is below:\r\n\r\n```html\r\n<section class=\"wb-lbx mfp-hide modal-dialog modal-content overlay-def confirm-dialog wb-lbx-inited\" id=\"SaveSuccessfulDialog\">\r\n                <header class=\"modal-header\">\r\n                    Success\r\n                </header>\r\n                <div class=\"modal-body\">\r\n                    Your data was saved successfully.\r\n                    <div class=\"align-center\">\r\n                        <input id=\"SaveDialogOKClose\" class=\"btn btn-primary btn-sm popup-modal-dismiss\" title=\"Ok\" name=\"ctl00$SaveDialogOKClose\" value=\"Ok\" type=\"submit\">\r\n                    </div>\r\n                </div>\r\n</section>\r\n```\r\n\r\nThanks in advance,\r\n\r\nGarth"},"comment":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/comments/105272207","html_url":"https://github.com/wet-boew/wet-boew/issues/6790#issuecomment-105272207","issue_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6790","id":105272207,"user":{"login":"LaurentGoderre","id":1090826,"avatar_url":"https://avatars.githubusercontent.com/u/1090826?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurentGoderre","html_url":"https://github.com/LaurentGoderre","followers_url":"https://api.github.com/users/LaurentGoderre/followers","following_url":"https://api.github.com/users/LaurentGoderre/following{/other_user}","gists_url":"https://api.github.com/users/LaurentGoderre/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurentGoderre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurentGoderre/subscriptions","organizations_url":"https://api.github.com/users/LaurentGoderre/orgs","repos_url":"https://api.github.com/users/LaurentGoderre/repos","events_url":"https://api.github.com/users/LaurentGoderre/events{/privacy}","received_events_url":"https://api.github.com/users/LaurentGoderre/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T17:18:24Z","updated_at":"2015-05-25T17:18:24Z","body":"@GarthMartin the problem is most likely that your server is incorrectly handling caching. The dependency loader we use (Yepnope, included in Modernizr) rely on proper caching to avoid these multiple loads."}}