diff --git src/wp-includes/js/tinymce/tinymce.js src/wp-includes/js/tinymce/tinymce.js
index 0eb9e3e7ae..b824a09cff 100644
--- src/wp-includes/js/tinymce/tinymce.js
+++ src/wp-includes/js/tinymce/tinymce.js
@@ -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) {
