Skip to content
Browse files

Use a clone of the widget element to initialize options set via HTML5…

… data-attributes.

This avoids crashes on IE6+IE7 when cloning the widget element and
fixes #1153.
  • Loading branch information...
1 parent 0681c84 commit 47bdcea664e44df062bd3bca70addff679e264a7 @blueimp committed Apr 4, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 js/jquery.fileupload.js
View
9 js/jquery.fileupload.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin 5.10.0
+ * jQuery File Upload Plugin 5.10.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -846,10 +846,9 @@
},
_create: function () {
- var options = this.options,
- dataOpts = $.extend({}, this.element.data());
- dataOpts[this.widgetName] = undefined;
- $.extend(options, dataOpts);
+ var options = this.options;
+ // Initialize options set via HTML5 data-attributes:
+ $.extend(options, $(this.element[0].cloneNode(false)).data());
options.namespace = options.namespace || this.widgetName;
this._initSpecialOptions();
this._slots = [];

0 comments on commit 47bdcea

Please sign in to comment.
Something went wrong with that request. Please try again.