mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
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:
@@ -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;
|
||||
|
||||
54
src/wp-includes/js/tinymce/tinymce.min.js
vendored
54
src/wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user