Editor: Disable wp_keep_scroll_position in IE11 since buggy; fix matches polyfill conflict with ME.js by doing runtime feature detection in context window.

Props westonruter, SergeyBiryukov, Clorith for testing.
See #41962, #42029.
Fixes #42553 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-11-15 18:58:26 +00:00
parent 551163278b
commit 7371834069
3 changed files with 6 additions and 27 deletions

View File

@ -639,7 +639,7 @@ if ( post_type_supports($post_type, 'editor') ) {
'resize' => false,
'wp_autoresize_on' => $_wp_editor_expand,
'add_unload_trigger' => false,
'wp_keep_scroll_position' => true,
'wp_keep_scroll_position' => ! $is_IE,
),
) ); ?>
<table id="post-status-info"><tbody><tr>

View File

@ -16386,27 +16386,6 @@ define(
],
function (Arr, Option, Element, NodeTypes, Error, document) {
/*
* There's a lot of code here; the aim is to allow the browser to optimise constant comparisons,
* instead of doing object lookup feature detection on every call
*/
var STANDARD = 0;
var MSSTANDARD = 1;
var WEBKITSTANDARD = 2;
var FIREFOXSTANDARD = 3;
var selectorType = (function () {
var test = document.createElement('span');
// As of Chrome 34 / Safari 7.1 / FireFox 34, everyone except IE has the unprefixed function.
// Still check for the others, but do it last.
return test.matches !== undefined ? STANDARD :
test.msMatchesSelector !== undefined ? MSSTANDARD :
test.webkitMatchesSelector !== undefined ? WEBKITSTANDARD :
test.mozMatchesSelector !== undefined ? FIREFOXSTANDARD :
-1;
})();
var ELEMENT = NodeTypes.ELEMENT;
var DOCUMENT = NodeTypes.DOCUMENT;
@ -16416,10 +16395,10 @@ define(
// As of Chrome 34 / Safari 7.1 / FireFox 34, everyone except IE has the unprefixed function.
// Still check for the others, but do it last.
else if (selectorType === STANDARD) return elem.matches(selector);
else if (selectorType === MSSTANDARD) return elem.msMatchesSelector(selector);
else if (selectorType === WEBKITSTANDARD) return elem.webkitMatchesSelector(selector);
else if (selectorType === FIREFOXSTANDARD) return elem.mozMatchesSelector(selector);
else if (elem.matches !== undefined) return elem.matches(selector);
else if (elem.msMatchesSelector !== undefined) return elem.msMatchesSelector(selector);
else if (elem.webkitMatchesSelector !== undefined) return elem.webkitMatchesSelector(selector);
else if (elem.mozMatchesSelector !== undefined) return elem.mozMatchesSelector(selector);
else throw new Error('Browser lacks native selectors'); // unfortunately we can't throw this on startup :(
};

View File

@ -18,7 +18,7 @@ $wp_db_version = 38590;
*
* @global string $tinymce_version
*/
$tinymce_version = '4607-20170918';
$tinymce_version = '4607-20171115';
/**
* Holds the required PHP version