From 4616931e3ab4d995a6e6c01eeeec817c01cdb98b Mon Sep 17 00:00:00 2001 From: Vincent Hou Date: Fri, 13 Mar 2015 11:23:56 +0800 Subject: [PATCH] fix the destroy issue, Original implementation will not clear out the eventHandler object. --- uploader/methods.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/uploader/methods.js b/uploader/methods.js index 5115d27..bd4ca99 100644 --- a/uploader/methods.js +++ b/uploader/methods.js @@ -508,8 +508,10 @@ */ destroy: function() { - // Delete all event handlers - delete this.eventHandlers; + // off all event handlers + for (var eh in this.eventHandlers){ + this.off(eh); + } // Remove the drop zone's event handlers if (this.$dropZone) {