Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CoreHome/vue/src/Notification/Notifications.store.ts')
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notifications.store.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts
index e014e9beda..651cdd127a 100644
--- a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts
+++ b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts
@@ -171,14 +171,19 @@ class NotificationsStore {
// If a modal is open, we want to make sure the error message is visible and therefore
// show it within the opened modal
const modalSelector = '.modal.open .modal-content';
- if (document.querySelector(modalSelector)) {
- notificationPosition = modalSelector;
+ const modal = document.querySelector(modalSelector);
+ if (modal) {
+ if (!modal.querySelector('#modalNotificationContainer')) {
+ window.$(modal).prepend('<div id="modalNotificationContainer"/>');
+ }
+
+ notificationPosition = `${modalSelector} #modalNotificationContainer`;
addMethod = this.prependNotification;
}
}
const group = notification.group
- || (notification.placeat ? notification.placeat.toString() : '');
+ || (notificationPosition ? notificationPosition.toString() : '');
this.initializeNotificationContainer(notificationPosition, group);