Make WordPress Core

Ticket #22974: 22974.diff

File 22974.diff, 960 bytes (added by nacin, 12 years ago)
  • src/javascript/plupload.html5.js

    diff --git a/src/javascript/plupload.html5.js b/src/javascript/plupload.html5.js
    index a327306..3dc03a3 100644
    a b  
    177177                                sliceSupport = !!(File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice));
    178178                        }
    179179
     180                        // Getting safari version in order to fix fakeSarafiDrop - for 5.1.2 and 4.* or lower.
     181                        var version = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)*)/);
     182                        version = version.length > 1 ? version[1] : version.substr(version.indexof('/') + 1);
     183
    180184                        // sniff out Safari for Windows and fake drag/drop
    181                         fakeSafariDragDrop = plupload.ua.safari && plupload.ua.windows;
     185                        fakeSafariDragDrop = plupload.ua.safari && plupload.ua.windows && ('5.1.2' == version || (/^[0-4](?:\.\d+)*/).test(version));
    182186
    183187                        return {
    184188                                html5: hasXhrSupport, // This is a special one that we check inside the init call