Ticket #31701: 31701.13.diff
File 31701.13.diff, 1.3 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/wp-emoji.js
30 30 */ 31 31 replaceEmoji = false, 32 32 33 isIE8 = window.navigator.userAgent.indexOf( 'IE 8' ) !== -1, 34 33 35 // Private 34 36 twemoji, timer, 35 37 count = 0; … … 46 48 return; 47 49 } 48 50 49 // Still waiting. 51 // Still waiting. 50 52 window.clearTimeout( timer ); 51 53 timer = window.setTimeout( load, 50 ); 52 54 count++; … … 131 133 132 134 // Load when the readyState changes to 'interactive', not 'complete'. 133 135 function onLoad() { 134 if ( 'interactive' === document.readyState) {136 if ( ( ! isIE8 && 'interactive' === document.readyState ) || ( isIE8 && 'complete' === document.readyState ) ) { 135 137 load(); 136 138 } 137 139 } … … 144 146 supportsFlagEmoji = window._wpemojiSettings.supports.flag; 145 147 replaceEmoji = ! supportsEmoji || ! supportsFlagEmoji; 146 148 147 if ( 'loading' == document.readyState) {149 if ( ( ! isIE8 && 'loading' === document.readyState ) || ( isIE8 && 'complete' !== document.readyState ) ) { 148 150 if ( document.addEventListener ) { 149 151 document.addEventListener( 'readystatechange', onLoad, false ); 150 152 } else if ( document.attachEvent ) {