|
2 | 2 | * @license MIT
|
3 | 3 | */
|
4 | 4 | (function(window, document, undefined) {'use strict';
|
5 |
| - |
| 5 | + // ie10+ |
| 6 | + var ie10plus = window.navigator.msPointerEnabled; |
6 | 7 | /**
|
7 | 8 | * Flow.js is a library providing multiple simultaneous, stable and
|
8 | 9 | * resumable uploads via the HTML5 File API.
|
|
198 | 199 | if (this.events.hasOwnProperty(event)) {
|
199 | 200 | each(this.events[event], function (callback) {
|
200 | 201 | preventDefault = callback.apply(this, args.slice(1)) === false || preventDefault;
|
201 |
| - }); |
| 202 | + }, this); |
202 | 203 | }
|
203 | 204 | if (event != 'catchall') {
|
204 | 205 | args.unshift('catchAll');
|
|
562 | 563 | addFiles: function (fileList, event) {
|
563 | 564 | var files = [];
|
564 | 565 | each(fileList, function (file) {
|
| 566 | + // Uploading empty file IE10/IE11 hangs indefinitely |
| 567 | + // see https://connect.microsoft.com/IE/feedback/details/813443/uploading-empty-file-ie10-ie11-hangs-indefinitely |
565 | 568 | // Directories have size `0` and name `.`
|
566 | 569 | // Ignore already added files
|
567 |
| - if (!(file.size % 4096 === 0 && (file.name === '.' || file.fileName === '.')) && |
| 570 | + if ((!ie10plus || ie10plus && file.size > 0) && !(file.size % 4096 === 0 && (file.name === '.' || file.fileName === '.')) && |
568 | 571 | !this.getFromUniqueIdentifier(this.generateUniqueIdentifier(file))) {
|
569 | 572 | var f = new FlowFile(this, file);
|
570 | 573 | if (this.fire('fileAdded', f, event)) {
|
|
1532 | 1535 | * Library version
|
1533 | 1536 | * @type {string}
|
1534 | 1537 | */
|
1535 |
| - Flow.version = '2.8.0'; |
| 1538 | + Flow.version = '2.9.0'; |
1536 | 1539 |
|
1537 | 1540 | if ( typeof module === "object" && module && typeof module.exports === "object" ) {
|
1538 | 1541 | // Expose Flow as module.exports in loaders that implement the Node
|
|
0 commit comments