{"action":"created","issue":{"url":"https://api.github.com/repos/enyo/dropzone/issues/854","labels_url":"https://api.github.com/repos/enyo/dropzone/issues/854/labels{/name}","comments_url":"https://api.github.com/repos/enyo/dropzone/issues/854/comments","events_url":"https://api.github.com/repos/enyo/dropzone/issues/854/events","html_url":"https://github.com/enyo/dropzone/issues/854","id":57906340,"number":854,"title":"Dropzone and Turbolinks.js","user":{"login":"itsmrwave","id":703786,"avatar_url":"https://avatars.githubusercontent.com/u/703786?v=3","gravatar_id":"","url":"https://api.github.com/users/itsmrwave","html_url":"https://github.com/itsmrwave","followers_url":"https://api.github.com/users/itsmrwave/followers","following_url":"https://api.github.com/users/itsmrwave/following{/other_user}","gists_url":"https://api.github.com/users/itsmrwave/gists{/gist_id}","starred_url":"https://api.github.com/users/itsmrwave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsmrwave/subscriptions","organizations_url":"https://api.github.com/users/itsmrwave/orgs","repos_url":"https://api.github.com/users/itsmrwave/repos","events_url":"https://api.github.com/users/itsmrwave/events{/privacy}","received_events_url":"https://api.github.com/users/itsmrwave/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-17T10:20:44Z","updated_at":"2015-05-24T11:34:34Z","closed_at":null,"body":"@enyo I'll just quote the [turbolinks.js][1] description to give an idea of what it does ... and hopefully, since you wrote this and understand the internals of Dropzone better than all of us, we can have a slight discussion as to what probably is going wrong/on.\r\n\r\n> Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head. Think CGI vs persistent process.\r\n\r\n> This is similar to [pjax][2], but instead of worrying about what element on the page to replace, and tailoring the server-side response to fit, we replace the entire body. This means that you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response. It just works.\r\n\r\nOh and, Turbolinks is shipped turned on by default with Rails.\r\n\r\nBased on the open issues here, I take it that (1) you are swamped and (2) most of these issues are support requests. My apologies.\r\n\r\nIn a nutshell ... with Turbolinks pages will change without a full reload, so you can't rely on `DOMContentLoaded` or `jQuery.ready()` to trigger your code. Instead Turbolinks fires events on document to provide hooks into the lifecycle of the page.\r\n\r\nFor example, if you had a spinner, you'd do something like this ...\r\n\r\n```javascript\r\n// using jQuery for simplicity\r\n$(document).on(\"page:fetch\", startSpinner);\r\n$(document).on(\"page:receive\", stopSpinner);\r\n```\r\n\r\nAfter going through Dropzone's documentation ... I take it that it's not designed to support such extreme modifications to typical browser behaviour. My objective therefore to just document this for people to find this topic when they google for the problem (there is a problem, they don't play nice).\r\n\r\n_Ps: Immediate solution is that I'll forfeit Turbolinks in favour of Dropzone. At least for now._\r\n\r\n[1]: https://github.com/rails/turbolinks/\r\n[2]: https://github.com/defunkt/jquery-pjax"},"comment":{"url":"https://api.github.com/repos/enyo/dropzone/issues/comments/105003703","html_url":"https://github.com/enyo/dropzone/issues/854#issuecomment-105003703","issue_url":"https://api.github.com/repos/enyo/dropzone/issues/854","id":105003703,"user":{"login":"jacekgrzybowski","id":3914691,"avatar_url":"https://avatars.githubusercontent.com/u/3914691?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekgrzybowski","html_url":"https://github.com/jacekgrzybowski","followers_url":"https://api.github.com/users/jacekgrzybowski/followers","following_url":"https://api.github.com/users/jacekgrzybowski/following{/other_user}","gists_url":"https://api.github.com/users/jacekgrzybowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekgrzybowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekgrzybowski/subscriptions","organizations_url":"https://api.github.com/users/jacekgrzybowski/orgs","repos_url":"https://api.github.com/users/jacekgrzybowski/repos","events_url":"https://api.github.com/users/jacekgrzybowski/events{/privacy}","received_events_url":"https://api.github.com/users/jacekgrzybowski/received_events","type":"User","site_admin":false},"created_at":"2015-05-24T11:34:34Z","updated_at":"2015-05-24T11:34:34Z","body":"My workaround is to set `data-no-turbolink` on a link which shows the page where dropzone is used. "}}