Ticket #47611: 47611.2.diff
File 47611.2.diff, 2.0 KB (added by , 5 years ago) |
---|
-
src/js/_enqueues/vendor/plupload/wp-plupload.js
120 120 * @param {plupload.File} file File that was uploaded. 121 121 */ 122 122 tryAgain = function( message, data, file ) { 123 var times; 124 var id; 123 var times, id; 125 124 126 125 if ( ! data || ! data.responseHeaders ) { 127 126 error( pluploadL10n.http_error_image, data, file, 'no-retry' ); … … 210 209 * @param {string} retry Whether to try again to create image sub-sizes. Passing 'no-retry' will prevent it. 211 210 */ 212 211 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; 215 214 216 215 // If the file is an image and the error is HTTP 5xx try to create sub-sizes again. 217 216 if ( retry !== 'no-retry' && isImage && status >= 500 && status < 600 ) { … … 327 326 this.browser.on( 'mouseenter', this.refresh ); 328 327 } else { 329 328 this.uploader.disableBrowse( true ); 330 // If HTML5 mode, hide the auto-created file container.331 $('#' + this.uploader.id + '_html5_container').hide();332 329 } 333 330 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 334 339 /** 335 340 * After files were filtered and added to the queue, create a model for each. 336 341 * … … 521 526 522 527 /* 523 528 * 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 525 530 * require the button to exist in the DOM at all times. 526 531 */ 527 532 if ( ! attached ) {