{"action":"created","issue":{"url":"https://api.github.com/repos/neilj/Squire/issues/154","labels_url":"https://api.github.com/repos/neilj/Squire/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/neilj/Squire/issues/154/comments","events_url":"https://api.github.com/repos/neilj/Squire/issues/154/events","html_url":"https://github.com/neilj/Squire/pull/154","id":116872322,"number":154,"title":"Added drop event support","user":{"login":"jeremyroberts0","id":1692997,"avatar_url":"https://avatars.githubusercontent.com/u/1692997?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyroberts0","html_url":"https://github.com/jeremyroberts0","followers_url":"https://api.github.com/users/jeremyroberts0/followers","following_url":"https://api.github.com/users/jeremyroberts0/following{/other_user}","gists_url":"https://api.github.com/users/jeremyroberts0/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyroberts0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyroberts0/subscriptions","organizations_url":"https://api.github.com/users/jeremyroberts0/orgs","repos_url":"https://api.github.com/users/jeremyroberts0/repos","events_url":"https://api.github.com/users/jeremyroberts0/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyroberts0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-13T23:13:25Z","updated_at":"2015-11-21T00:26:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neilj/Squire/pulls/154","html_url":"https://github.com/neilj/Squire/pull/154","diff_url":"https://github.com/neilj/Squire/pull/154.diff","patch_url":"https://github.com/neilj/Squire/pull/154.patch"},"body":"Stops the default redirect behavior when dropping a file.  The \"drop\" event can then be captured by the addEventListener API in the host document."},"comment":{"url":"https://api.github.com/repos/neilj/Squire/issues/comments/158566135","html_url":"https://github.com/neilj/Squire/pull/154#issuecomment-158566135","issue_url":"https://api.github.com/repos/neilj/Squire/issues/154","id":158566135,"user":{"login":"jeremyroberts0","id":1692997,"avatar_url":"https://avatars.githubusercontent.com/u/1692997?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyroberts0","html_url":"https://github.com/jeremyroberts0","followers_url":"https://api.github.com/users/jeremyroberts0/followers","following_url":"https://api.github.com/users/jeremyroberts0/following{/other_user}","gists_url":"https://api.github.com/users/jeremyroberts0/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyroberts0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyroberts0/subscriptions","organizations_url":"https://api.github.com/users/jeremyroberts0/orgs","repos_url":"https://api.github.com/users/jeremyroberts0/repos","events_url":"https://api.github.com/users/jeremyroberts0/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyroberts0/received_events","type":"User","site_admin":false},"created_at":"2015-11-21T00:26:38Z","updated_at":"2015-11-21T00:26:38Z","body":"I found that calling event.preventDefault in the host wasn't preventing the browser (Chrome 46) from redirecting the file dropped in the iFrame.  It also seems that preventDefault is needed on the dragover **and** drop events, if either listener is removed, the redirected is triggered.\r\n\r\nI updated the event listener to call a preventDefaultEvent method that is attached to the prototype now, this seemed to be how other events are being handled, Apologies if this isn't the code-style you're looking for, I don't often contribute to open-source projects like this.\r\n\r\nThe reason I made this change is: I am trying to support a user dropping an image into the editor, and then uploading that image through my file storage service, and then injecting the <img> tag into the editor.  This interaction works great with the code in this pull request but isn't possible without it."}}