Suggested Change - Avoid form hijacking
Remove addClass from container, ensure it is added to dropZone. dropZone is set with container by default so this doesn't break anything. Just stops the form from being taken over by the class when all you want is the dropzone.
change line 519: container .data(settings.namespace, fileUpload) .addClass(settings.cssClass); settings.dropZone.not(container).addClass(settings.cssClass);
to: container .data(settings.namespace, fileUpload); settings.dropZone.addClass(settings.cssClass);
There is a reason the class is added to both the container and the dropZone as both have styling implications:
- The dropZone for the area that files can get dropped on.
- The container for the enclosed file input button, that is used to select files.
To style the dropZone but not the container you only have to adjust the CSS definitions to be more specific and not style every element with class file_upload.