Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting dropzone element to document.body #304

Open
bruno-fernandes opened this issue Mar 16, 2018 · 4 comments
Open

Setting dropzone element to document.body #304

bruno-fernandes opened this issue Mar 16, 2018 · 4 comments

Comments

@bruno-fernandes
Copy link

Hi,

Is there an option to set the dropzone element to document.body(or any other dom element using id/class) so drop anywhere is supported?

// https://github.com/rowanwins/vue-dropzone/blob/237ccc7a562bd5a218c8370c301d9f654796bed9/src/components/vue-dropzone.vue#L189
// when Dropzone is initialized it seems to set it always to a child element
this.dropzone = new Dropzone(this.$refs.dropzoneElement, this.dropzoneSettings)

This is an example using Dropzone without vue-dropzone: https://github.com/enyo/dropzone/wiki/Make-the-whole-body-a-dropzone

@rowanwins
Copy link
Owner

Hmm unfortunately that's not currently possible with this component and I highly doubt we'd ever support it given that it's such a specific use case, but I'll give it a bit of thought before I close the issue

@Pitu
Copy link

Pitu commented May 20, 2018

It would be very nice to see this implemented as it's a common feature on file uploaders. On vanilla dropzone you can achieve this by passing the element you want dropzone to attach to as the first parameter like @bruno-fernandes mentioned.

@divdax
Copy link

divdax commented Mar 16, 2019

@rowanwins Drag & Drop support on page body is a must have... see google photos. Much better user experience! Just pass the body element as first parameter to dropzone...

@bcalik
Copy link

bcalik commented May 23, 2020

@rowanwins Just allow us to set this line as document.body, and its fixed.

Example: https://www.dropzonejs.com/bootstrap.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants