{"action":"created","issue":{"url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/169","labels_url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/169/comments","events_url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/169/events","html_url":"https://github.com/weixiyen/jquery-filedrop/issues/169","id":52157218,"number":169,"title":"RangeError: Maximum call stack size exceeded.","user":{"login":"zedtux","id":478564,"avatar_url":"https://avatars.githubusercontent.com/u/478564?v=3","gravatar_id":"","url":"https://api.github.com/users/zedtux","html_url":"https://github.com/zedtux","followers_url":"https://api.github.com/users/zedtux/followers","following_url":"https://api.github.com/users/zedtux/following{/other_user}","gists_url":"https://api.github.com/users/zedtux/gists{/gist_id}","starred_url":"https://api.github.com/users/zedtux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zedtux/subscriptions","organizations_url":"https://api.github.com/users/zedtux/orgs","repos_url":"https://api.github.com/users/zedtux/repos","events_url":"https://api.github.com/users/zedtux/events{/privacy}","received_events_url":"https://api.github.com/users/zedtux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-16T19:39:57Z","updated_at":"2015-05-15T11:29:33Z","closed_at":null,"body":"Hello,\r\n\r\nFirst of all, this is a very nice plugin ! :+1: \r\n\r\nI have discovered the following bug:\r\n\r\n    Given the file field is placed within the HTML element where `filedrop` is applied\r\n    When user click the drop zone\r\n    Then the error \"RangeError: Maximum call stack size exceeded.\" is raised\r\n\r\nThe issue is that clicking the HTML element fire the `click` event of jquery-filedrop AND the `click` event of the file field.\r\n\r\nMoving it out of the dropzone HTML element solve the issue."},"comment":{"url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/comments/102374209","html_url":"https://github.com/weixiyen/jquery-filedrop/issues/169#issuecomment-102374209","issue_url":"https://api.github.com/repos/weixiyen/jquery-filedrop/issues/169","id":102374209,"user":{"login":"boughtonp","id":167122,"avatar_url":"https://avatars.githubusercontent.com/u/167122?v=3","gravatar_id":"","url":"https://api.github.com/users/boughtonp","html_url":"https://github.com/boughtonp","followers_url":"https://api.github.com/users/boughtonp/followers","following_url":"https://api.github.com/users/boughtonp/following{/other_user}","gists_url":"https://api.github.com/users/boughtonp/gists{/gist_id}","starred_url":"https://api.github.com/users/boughtonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boughtonp/subscriptions","organizations_url":"https://api.github.com/users/boughtonp/orgs","repos_url":"https://api.github.com/users/boughtonp/repos","events_url":"https://api.github.com/users/boughtonp/events{/privacy}","received_events_url":"https://api.github.com/users/boughtonp/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T11:29:33Z","updated_at":"2015-05-15T11:29:33Z","body":"Have upgraded to latest version from git master and encountering the same issue (it wasn't occurring before).\r\n\r\nDifferent browsers give different errors though, so to help others find this issue...\r\n\r\nFirefox\r\n    too much recursion\r\n    jquery-migrate-1.2.1.min.js\r\n    Line 2\r\n\r\nIE 11\r\n    SCRIPT28: Out of stack space\r\n    File: jquery-2.0.3.min.js, Line: 5, Column: 8326\r\n\r\n\r\nWith the file field outside the drop-zone, but a button inside that triggers it, the click event still fires twice:\r\n\r\n\t<button class=\"button btn btn-primary\" onclick=\"$('#file_uploader').click();\" type=\"button\">Select Files</button>\r\n\r\nThe solution to that being to stop the propagation in that onclick event:\r\n\r\n\tonclick=\"event.stopPropagation();$('#file_uploader').click();\""}}