Make WordPress Core

Ticket #47611: 47611.2.diff

File 47611.2.diff, 2.0 KB (added by afercia, 5 years ago)
  • src/js/_enqueues/vendor/plupload/wp-plupload.js

     
    120120                 * @param  {plupload.File} file     File that was uploaded.
    121121                 */
    122122                tryAgain = function( message, data, file ) {
    123                         var times;
    124                         var id;
     123                        var times, id;
    125124
    126125                        if ( ! data || ! data.responseHeaders ) {
    127126                                error( pluploadL10n.http_error_image, data, file, 'no-retry' );
     
    210209                 * @param  {string}        retry    Whether to try again to create image sub-sizes. Passing 'no-retry' will prevent it.
    211210                 */
    212211                error = function( message, data, file, retry ) {
    213                         var isImage = file.type && file.type.indexOf( 'image/' ) === 0;
    214                         var status = data && data.status;
     212                        var isImage = file.type && file.type.indexOf( 'image/' ) === 0,
     213                                status = data && data.status;
    215214
    216215                        // If the file is an image and the error is HTTP 5xx try to create sub-sizes again.
    217216                        if ( retry !== 'no-retry' && isImage && status >= 500 && status < 600 ) {
     
    327326                        this.browser.on( 'mouseenter', this.refresh );
    328327                } else {
    329328                        this.uploader.disableBrowse( true );
    330                         // If HTML5 mode, hide the auto-created file container.
    331                         $('#' + this.uploader.id + '_html5_container').hide();
    332329                }
    333330
     331                $( self ).on( 'uploader:ready', function() {
     332                        $( '.moxie-shim-html5 input[type="file"]' )
     333                                .attr( {
     334                                        tabIndex:      '-1',
     335                                        'aria-hidden': 'true'
     336                                } );
     337                } );
     338
    334339                /**
    335340                 * After files were filtered and added to the queue, create a model for each.
    336341                 *
     
    521526
    522527                                /*
    523528                                 * If the browser node is not attached to the DOM,
    524                                  * use a temporary container to house it, as the browser button shims 
     529                                 * use a temporary container to house it, as the browser button shims
    525530                                 * require the button to exist in the DOM at all times.
    526531                                 */
    527532                                if ( ! attached ) {