diff --git a/client/fileuploader.js b/client/fileuploader.js
index <HASH>..<HASH> 100755
--- a/client/fileuploader.js
+++ b/client/fileuploader.js
@@ -920,6 +920,8 @@ qq.extend(qq.FileUploader.prototype, {
                 qq.preventDefault(e);
 
                 var item = target.parentNode;
+                while(item.qqFileId == undefined) { item = target = target.parentNode; }
+
                 self._handler.cancel(item.qqFileId);
                 qq.remove(item);
             }
Fix for nested cancel button/link

Cancel handler not work if `fileTemplate` root node is different of cancel `parentNode`, maybe it's not good idea use a `while` but if file template root node always have a `qqFileId` [line <I>](#L<I>) property why not?