Fix initialization of wp-emoji in IE8.
Props pento, azaozz. Fixes #31701. Built from https://develop.svn.wordpress.org/trunk@31898 git-svn-id: http://core.svn.wordpress.org/trunk@31877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9b23faef07
commit
62c3c1d798
File diff suppressed because one or more lines are too long
|
@ -30,6 +30,8 @@
|
|||
*/
|
||||
replaceEmoji = false,
|
||||
|
||||
isIE8 = window.navigator.userAgent.indexOf( 'IE 8' ) !== -1,
|
||||
|
||||
// Private
|
||||
twemoji, timer,
|
||||
count = 0;
|
||||
|
@ -46,7 +48,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Still waiting.
|
||||
// Still waiting.
|
||||
window.clearTimeout( timer );
|
||||
timer = window.setTimeout( load, 50 );
|
||||
count++;
|
||||
|
@ -131,7 +133,7 @@
|
|||
|
||||
// Load when the readyState changes to 'interactive', not 'complete'.
|
||||
function onLoad() {
|
||||
if ( 'interactive' === document.readyState ) {
|
||||
if ( ( ! isIE8 && 'interactive' === document.readyState ) || ( isIE8 && 'complete' === document.readyState ) ) {
|
||||
load();
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +146,7 @@
|
|||
supportsFlagEmoji = window._wpemojiSettings.supports.flag;
|
||||
replaceEmoji = ! supportsEmoji || ! supportsFlagEmoji;
|
||||
|
||||
if ( 'loading' == document.readyState ) {
|
||||
if ( ( ! isIE8 && 'loading' === document.readyState ) || ( isIE8 && 'complete' !== document.readyState ) ) {
|
||||
if ( document.addEventListener ) {
|
||||
document.addEventListener( 'readystatechange', onLoad, false );
|
||||
} else if ( document.attachEvent ) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(a,b){function c(){function c(){if("undefined"==typeof a.twemoji){if(l>600)return;return a.clearTimeout(g),g=a.setTimeout(c,50),void l++}f=a.twemoji,h&&new h(function(a){for(var b,c,e=a.length;e--;)for(b=a[e].addedNodes.length;b--;)c=a[e].addedNodes[b],3===c.nodeType&&(c=c.parentNode),c&&1===c.nodeType&&d(c)}).observe(document.body,{childList:!0,subtree:!0}),d(document.body)}function d(a,c){if(!k)return a;var d=c&&c.className||"emoji";return f.parse(a,{base:b.baseUrl,ext:b.ext,className:d,callback:function(a,b){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return j||!i||/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?"".concat(b.base,"/",a,b.ext):!1}})}function e(){"interactive"===document.readyState&&c()}var f,g,h=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,i=!1,j=!1,k=!1,l=0;return b&&(i=a._wpemojiSettings.supports.simple,j=a._wpemojiSettings.supports.flag,k=!i||!j,"loading"==document.readyState?document.addEventListener?document.addEventListener("readystatechange",e,!1):document.attachEvent&&document.attachEvent("onreadystatechange",e):c()),{replaceEmoji:k,parse:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
|
||||
!function(a,b){function c(){function c(){if("undefined"==typeof a.twemoji){if(m>600)return;return a.clearTimeout(g),g=a.setTimeout(c,50),void m++}f=a.twemoji,h&&new h(function(a){for(var b,c,e=a.length;e--;)for(b=a[e].addedNodes.length;b--;)c=a[e].addedNodes[b],3===c.nodeType&&(c=c.parentNode),c&&1===c.nodeType&&d(c)}).observe(document.body,{childList:!0,subtree:!0}),d(document.body)}function d(a,c){if(!k)return a;var d=c&&c.className||"emoji";return f.parse(a,{base:b.baseUrl,ext:b.ext,className:d,callback:function(a,b){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return j||!i||/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?"".concat(b.base,"/",a,b.ext):!1}})}function e(){(!l&&"interactive"===document.readyState||l&&"complete"===document.readyState)&&c()}var f,g,h=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,i=!1,j=!1,k=!1,l=-1!==a.navigator.userAgent.indexOf("IE 8"),m=0;return b&&(i=a._wpemojiSettings.supports.simple,j=a._wpemojiSettings.supports.flag,k=!i||!j,!l&&"loading"===document.readyState||l&&"complete"!==document.readyState?document.addEventListener?document.addEventListener("readystatechange",e,!1):document.attachEvent&&document.attachEvent("onreadystatechange",e):c()),{replaceEmoji:k,parse:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-beta2-31897';
|
||||
$wp_version = '4.2-beta2-31898';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue