diff options
Diffstat (limited to 'plugins/CoreHome/vue/src/Notification/Notifications.store.ts')
-rw-r--r-- | plugins/CoreHome/vue/src/Notification/Notifications.store.ts | 11 |
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); |