Skip to content

Commit b34ba83

Browse files
committed
Only unbind the original event handler.
1 parent 0369821 commit b34ba83

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

js/jquery.fileupload-ui.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,15 +604,16 @@
604604
node.hasClass('fade') &&
605605
node.is(':visible')
606606
) {
607+
var transitionEndHandler = function(e) {
608+
// Make sure we don't respond to other transition events
609+
// in the container element, e.g. from button elements:
610+
if (e.target === node[0]) {
611+
node.unbind($.support.transition.end, transitionEndHandler);
612+
dfd.resolveWith(node);
613+
}
614+
};
607615
node
608-
.bind($.support.transition.end, function(e) {
609-
// Make sure we don't respond to other transitions events
610-
// in the container element, e.g. from button elements:
611-
if (e.target === node[0]) {
612-
node.unbind($.support.transition.end);
613-
dfd.resolveWith(node);
614-
}
615-
})
616+
.bind($.support.transition.end, transitionEndHandler)
616617
.toggleClass('in');
617618
} else {
618619
node.toggleClass('in');

0 commit comments

Comments
 (0)