{"action":"opened","issue":{"url":"https://api.github.com/repos/sconsult/croppic/issues/154","labels_url":"https://api.github.com/repos/sconsult/croppic/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/sconsult/croppic/issues/154/comments","events_url":"https://api.github.com/repos/sconsult/croppic/issues/154/events","html_url":"https://github.com/sconsult/croppic/issues/154","id":100859654,"number":154,"title":"Append upload form image to body instead of wrapper","user":{"login":"arielkruger1989","id":6836456,"avatar_url":"https://avatars.githubusercontent.com/u/6836456?v=3","gravatar_id":"","url":"https://api.github.com/users/arielkruger1989","html_url":"https://github.com/arielkruger1989","followers_url":"https://api.github.com/users/arielkruger1989/followers","following_url":"https://api.github.com/users/arielkruger1989/following{/other_user}","gists_url":"https://api.github.com/users/arielkruger1989/gists{/gist_id}","starred_url":"https://api.github.com/users/arielkruger1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arielkruger1989/subscriptions","organizations_url":"https://api.github.com/users/arielkruger1989/orgs","repos_url":"https://api.github.com/users/arielkruger1989/repos","events_url":"https://api.github.com/users/arielkruger1989/events{/privacy}","received_events_url":"https://api.github.com/users/arielkruger1989/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-13T20:19:31Z","updated_at":"2015-08-13T20:19:31Z","closed_at":null,"body":"I would suggest the following change.\r\nfrom:\r\n```\r\nvar formHtml = '<form class=\"' + that.id + '_imgUploadForm\" style=\"display: none; visibility: hidden;\">  <input type=\"file\" name=\"img\" id=\"' + that.id + '_imgUploadField\">  </form>';\r\n\t\t\tthat.outputDiv.append(formHtml);\r\n\t\t\tthat.form = that.outputDiv.find('.'+that.id+'_imgUploadForm');\r\n```\r\nto:\r\n```\r\nvar formHtml = '<form class=\"' + that.id + '_imgUploadForm\" style=\"display: none; visibility: hidden;\">  <input type=\"file\" name=\"img\" id=\"' + that.id + '_imgUploadField\">  </form>';\r\n\t\t\t$(\"body\").append(formHtml);\r\n\t\t\tthat.form = $(\"body\").find('.'+that.id+'_imgUploadForm');\r\n```\r\n\r\nThe reason is that certain browsers will not accept a form inside of another form for security reasons and there is a big possibility that the croppic wrapper would be inside of a form."}}