Dropzone Child elements are not clickable for upload

When attaching the .dropzone() object via jQuery, generally it does not allow you to click child elements and open the upload dialog.

In this case below, if you click the H3 element, the upload dialog is not opened, you must click outside of the H3 but still inside of the parent tag. This gets very frustrating.

In the example above the H3 tag is not clickable and does not fire file upload window.

There is an option to attach clickable event manually to a given element. A css class dz-clickable can be passed to an element to make it clickable.

This option however works only once. That is, only the very first element with this class becomes clickable and any other elements with this class remains un- attached. For example the <p> tag below wont be clickable

Another option to make all elements within the dropzone is to specify clickable option. clickable option like any other jQuery selector accepts multiple selectors. For example:

Many elements can be grouped within an element such as div and specify the clickable option for div. e.g;

Leave a Reply