{"action":"created","issue":{"url":"https://api.github.com/repos/taromero/swal-forms/issues/22","repository_url":"https://api.github.com/repos/taromero/swal-forms","labels_url":"https://api.github.com/repos/taromero/swal-forms/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/taromero/swal-forms/issues/22/comments","events_url":"https://api.github.com/repos/taromero/swal-forms/issues/22/events","html_url":"https://github.com/taromero/swal-forms/issues/22","id":168849367,"number":22,"title":"Uncaught TypeError: Cannot read property 'querySelector' of null","user":{"login":"karankashyap","id":789505,"avatar_url":"https://avatars.githubusercontent.com/u/789505?v=3","gravatar_id":"","url":"https://api.github.com/users/karankashyap","html_url":"https://github.com/karankashyap","followers_url":"https://api.github.com/users/karankashyap/followers","following_url":"https://api.github.com/users/karankashyap/following{/other_user}","gists_url":"https://api.github.com/users/karankashyap/gists{/gist_id}","starred_url":"https://api.github.com/users/karankashyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karankashyap/subscriptions","organizations_url":"https://api.github.com/users/karankashyap/orgs","repos_url":"https://api.github.com/users/karankashyap/repos","events_url":"https://api.github.com/users/karankashyap/events{/privacy}","received_events_url":"https://api.github.com/users/karankashyap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-02T10:16:35Z","updated_at":"2016-08-20T14:27:47Z","closed_at":null,"body":"SweetAlert is working fine. Swal forms is not. \r\n**swal-forms.js** (src https://github.com/taromero/swal-forms/blob/master/swal-forms.js) and is initialized after swal.js\r\n\r\n**Console error:** \r\nUncaught TypeError: _Cannot read property 'querySelector' of null at_ swal-forms.js:109 \r\n_insertFormInSwalModal @_ swal-forms.js:109\r\n_swal.withForm @_ swal-forms.js:15\r\n\r\n**swal-forms.js:109**\r\n`var buttonContainerTag = sweetAlertModal.querySelector('.sa-button-container') || sweetAlertModal.querySelector('.cancel')`\r\n\r\nI'm using Complex example (src https://cdn.rawgit.com/taromero/swal-forms/master/live-demo/live-demo.html) "},"comment":{"url":"https://api.github.com/repos/taromero/swal-forms/issues/comments/241203059","html_url":"https://github.com/taromero/swal-forms/issues/22#issuecomment-241203059","issue_url":"https://api.github.com/repos/taromero/swal-forms/issues/22","id":241203059,"user":{"login":"taromero","id":1489035,"avatar_url":"https://avatars.githubusercontent.com/u/1489035?v=3","gravatar_id":"","url":"https://api.github.com/users/taromero","html_url":"https://github.com/taromero","followers_url":"https://api.github.com/users/taromero/followers","following_url":"https://api.github.com/users/taromero/following{/other_user}","gists_url":"https://api.github.com/users/taromero/gists{/gist_id}","starred_url":"https://api.github.com/users/taromero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taromero/subscriptions","organizations_url":"https://api.github.com/users/taromero/orgs","repos_url":"https://api.github.com/users/taromero/repos","events_url":"https://api.github.com/users/taromero/events{/privacy}","received_events_url":"https://api.github.com/users/taromero/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T14:27:47Z","updated_at":"2016-08-20T14:27:47Z","body":"1- Are you running swal-forms after the window.onload event?\r\n2- Have you added a div with the sweet-alert class?\r\n\r\nIt seems that the script is failing to find the sweet alert modal, which could be caused by either of those.\r\n\r\nIf you have a div with the sweet-alert class, and you are calling sweet-forms after window.onload, please provide a JsFiddle or so to reproduce the error."}}
{"actor":{"display_login":"taromero"}}