pekebyte / pekeUpload

jQuery html5 file uploader plugin
http://pekebyte.github.io/pekeUpload
Other
82 stars 73 forks source link

on "change" event listening on document #29

Open fredericoregateiro opened 7 years ago

fredericoregateiro commented 7 years ago

Why do you listening to the change event on the document?

$(document).on("change", this.obj, function() { pekeUpload.checkFile(pekeUpload.obj[0].files[0]); }); I have a pekeUpload control and a select2 on the same form, and when i trigger a change event on my select2, i get a Cannot read property 'size' of undefined And all starts on this event listening

I think you could use event namespaces, or lintening only on the pekeUpload container