TinyMCE: backport bug fixes to `NotificationManager` and `WindowManager` from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to `MultiRange` from 250675bb7b.

Props peterwilsoncc, azaozz.
Fixes #42722 for trunk, see #43012.

git-svn-id: https://develop.svn.wordpress.org/trunk@42576 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-01-23 19:34:17 +00:00
parent d6cc2b6f02
commit cc5fdf702a
3 changed files with 28 additions and 44 deletions

View File

@ -25398,7 +25398,7 @@ define(
var getImplementation = function () {
var theme = editor.theme;
return theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl(editor);
return theme && theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl(editor);
};
var getTopNotification = function () {
@ -25410,7 +25410,9 @@ define(
};
var reposition = function () {
getImplementation().reposition(notifications);
if (notifications.length > 0) {
getImplementation().reposition(notifications);
}
};
var addNotification = function (notification) {
@ -28295,7 +28297,7 @@ define(
var getImplementation = function () {
var theme = editor.theme;
return theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl(editor);
return theme && theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl(editor);
};
var funcBind = function (scope, f) {
@ -28338,7 +28340,7 @@ define(
};
var getTopWindow = function () {
return Option.from(windows[0]);
return Option.from(windows[windows.length - 1]);
};
var open = function (args, params) {
@ -30456,8 +30458,10 @@ define(
var getRanges = function (selection) {
var ranges = [];
for (var i = 0; i < selection.rangeCount; i++) {
ranges.push(selection.getRangeAt(i));
if (selection) {
for (var i = 0; i < selection.rangeCount; i++) {
ranges.push(selection.getRangeAt(i));
}
}
return ranges;

File diff suppressed because one or more lines are too long

View File

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