Permalink
Browse files

Resolve manually when the preview element is not part of the DOM.

Fixes #1129.
  • Loading branch information...
1 parent 286e790 commit ea5b386afeef941feecf41cdf0f1bf9e68b00159 @blueimp blueimp committed Mar 28, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 js/jquery.fileupload-ui.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload User Interface Plugin 6.6.3
+ * jQuery File Upload User Interface Plugin 6.6.4
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -377,6 +377,12 @@
that._transition(node).done(function () {
deferred.resolveWith(node);
});
+ if (!$.contains(document.body, node[0])) {
+ // If the element is not part of the DOM,
+ // transition events are not triggered,
+ // so we have to resolve manually:
+ deferred.resolveWith(node);
+ }
},
{
maxWidth: options.previewMaxWidth,

0 comments on commit ea5b386

Please sign in to comment.