Vue-dropzone: Setting dropzone element to document.body

Created on 16 Mar 2018  路  4Comments  路  Source: rowanwins/vue-dropzone

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

feature request

Most helpful comment

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.

All 4 comments

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

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.

@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...

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pigszel picture pigszel  路  3Comments

estrica2000 picture estrica2000  路  5Comments

yhosun picture yhosun  路  5Comments

vesper8 picture vesper8  路  4Comments

stevenhardy-digital picture stevenhardy-digital  路  4Comments